Partially fix wrong position calculation caused by outer transformations
This commit is contained in:
1 parent
3952358d87
commit
12295e5137
1 file changed
+7
-1
@@ -54,7 +54,13 @@ class LayerBackdrop internal constructor(
|
||||
if (layerBlock != null) {
|
||||
with(obtainInverseLayerScope()) { inverseTransform(density, layerBlock) }
|
||||
}
|
||||
val offset = coordinates.positionInWindow() - layerCoordinates.positionInWindow()
|
||||
val offset =
|
||||
try {
|
||||
layerCoordinates.localPositionOf(coordinates)
|
||||
} catch (_: Exception) {
|
||||
// TODO: outer transformations lead to wrong position calculation
|
||||
coordinates.positionInWindow() - layerCoordinates.positionInWindow()
|
||||
}
|
||||
translate(-offset.x, -offset.y)
|
||||
}) {
|
||||
drawLayer(graphicsLayer)
|
||||
|
||||
Reference in new issue
Block a user