@_unit/unit 1.0.27 → 1.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/web.js +7 -7
- package/lib/client/PositionObserver.js +1 -2
- package/lib/client/PositionObserver.js.map +1 -1
- package/lib/client/parseTransform.js +14 -0
- package/lib/client/parseTransform.js.map +1 -1
- package/package.json +1 -1
- package/public/_worker.js +3 -3
- package/public/_worker.js.map +2 -2
- package/public/build.json +1 -1
- package/public/index.js +7 -7
- package/public/index.js.map +3 -3
- package/src/client/PositionObserver.ts +1 -3
- package/src/client/parseTransform.ts +19 -0
|
@@ -120,9 +120,7 @@ export class PositionObserver implements IPositionObserver {
|
|
|
120
120
|
offset_x = offsetLeft
|
|
121
121
|
offset_y = offsetTop
|
|
122
122
|
|
|
123
|
-
const { transform } =
|
|
124
|
-
|
|
125
|
-
const { borderWidth } = getComputedStyle(element)
|
|
123
|
+
const { borderWidth, transform } = getComputedStyle(element)
|
|
126
124
|
|
|
127
125
|
if (
|
|
128
126
|
transform !== _transform ||
|
|
@@ -121,6 +121,25 @@ export function parseTransform(
|
|
|
121
121
|
const [deg] = degt
|
|
122
122
|
_rotate_z += deg
|
|
123
123
|
}
|
|
124
|
+
break
|
|
125
|
+
case 'matrix':
|
|
126
|
+
{
|
|
127
|
+
const [at, bt, ct, dt, txt, tyt] = f_args_list
|
|
128
|
+
|
|
129
|
+
const [tx] = txt
|
|
130
|
+
const [ty] = tyt
|
|
131
|
+
const [a] = at
|
|
132
|
+
const [d] = dt
|
|
133
|
+
|
|
134
|
+
_transform_x += tx / a
|
|
135
|
+
_transform_y += ty / d
|
|
136
|
+
|
|
137
|
+
_scale_x *= a
|
|
138
|
+
_scale_y *= d
|
|
139
|
+
|
|
140
|
+
// TODO b, c
|
|
141
|
+
}
|
|
142
|
+
|
|
124
143
|
break
|
|
125
144
|
default:
|
|
126
145
|
break
|