1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-08-15 08:00:31 +03:00

Fix #692: Consider layout transform in findNode

This commit is contained in:
Alisa Mylnikova 2020-06-03 14:17:17 +07:00
parent b13d043073
commit d89e2047fe
2 changed files with 6 additions and 2 deletions

View File

@ -150,6 +150,9 @@ class AnimationUtils {
}
parent = parent?.parentRenderer
}
if let viewPlace = renderer.view?.place {
uncachedParentsPlace = uncachedParentsPlace.concat(with: viewPlace)
}
return uncachedParentsPlace
}
}

View File

@ -346,10 +346,11 @@ internal class DrawingView: MView {
defer {
MGraphicsEndImageContext()
}
guard let ctx = MGraphicsGetCurrentContext() else {
guard let ctx = MGraphicsGetCurrentContext(), let inverted = self.place.invert() else {
return .none
}
return doFindNode(location: location, ctx: ctx)
let loc = location.applying(inverted.toCG())
return doFindNode(location: loc, ctx: ctx)
}
// MARK: - Touches