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

Merge pull request #694 from f3dm76/fix/consider-view-content-layout

Fix #692: Consider layout transform in findNode
This commit is contained in:
Yuri Strot 2020-06-03 15:48:09 +07:00 committed by GitHub
commit e9cfc18280
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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