aboutsummaryrefslogtreecommitdiffstats
path: root/src/helpers.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers.js')
-rw-r--r--src/helpers.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helpers.js b/src/helpers.js
index 3981c94..9159b4f 100644
--- a/src/helpers.js
+++ b/src/helpers.js
@@ -260,7 +260,7 @@ function formatTransforms (o) {
}
}
-function getOrigin (transforms, element) {
+function getOrigin (o, element) {
// Allow origin or around as the names
origin = o.around == null ? o.origin : o.around
@@ -268,7 +268,7 @@ function getOrigin (transforms, element) {
if ( typeof origin === 'string' || origin == null ) {
// Get the bounding box of the element with no transformations applied
const string = (origin || 'center').toLowerCase().trim()
- const { height, width, x, y } = this.bbox()
+ const { height, width, x, y } = element.bbox()
// Set the bounds eg : "bottom-left", "Top right", "middle" etc...
const ox = o.ox || string.includes('left') ? x