diff options
Diffstat (limited to 'src/utils/utils.js')
-rw-r--r-- | src/utils/utils.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/utils/utils.js b/src/utils/utils.js index edd98b6..ab0fda0 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -82,8 +82,8 @@ export function getOrigin(o, element) { ;[ox, oy] = Array.isArray(origin) ? origin : typeof origin === 'object' - ? [origin.x, origin.y] - : [origin, origin] + ? [origin.x, origin.y] + : [origin, origin] } // Make sure to only call bbox when actually needed @@ -97,16 +97,16 @@ export function getOrigin(o, element) { ox = ox.includes('left') ? x : ox.includes('right') - ? x + width - : x + width / 2 + ? x + width + : x + width / 2 } if (condY) { oy = oy.includes('top') ? y : oy.includes('bottom') - ? y + height - : y + height / 2 + ? y + height + : y + height / 2 } } |