(attachment, relativeToAttachment)
| 54 | } |
| 55 | |
| 56 | export function autoToFixedAttachment(attachment, relativeToAttachment) { |
| 57 | let { left, top } = attachment; |
| 58 | |
| 59 | if (left === 'auto') { |
| 60 | left = MIRROR_LR[relativeToAttachment.left]; |
| 61 | } |
| 62 | |
| 63 | if (top === 'auto') { |
| 64 | top = MIRROR_TB[relativeToAttachment.top]; |
| 65 | } |
| 66 | |
| 67 | return { left, top }; |
| 68 | } |
| 69 | |
| 70 | export function offsetToPx(offset, size) { |
| 71 | if (isString(offset.left) && offset.left.indexOf('%') !== -1) { |
no outgoing calls
no test coverage detected
searching dependent graphs…