diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2024-06-18 11:01:45 +0200 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2024-06-18 11:01:45 +0200 |
commit | a1c23d3838f6551f01894be40c8894398467c541 (patch) | |
tree | deb1ff485284dd0040dc50aec4f8df2c129bc22c /src/utils | |
parent | 3b47e461f0773e619619f1bc838234fdd9920d90 (diff) | |
download | svg.js-a1c23d3838f6551f01894be40c8894398467c541.tar.gz svg.js-a1c23d3838f6551f01894be40c8894398467c541.zip |
update dependencies
Diffstat (limited to 'src/utils')
-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 } } |