Various fixes

This commit is contained in:
Ilya Laktyushin
2024-03-27 18:00:49 +04:00
parent d4e0dd8ef9
commit 75dbdec6f6
6 changed files with 47 additions and 33 deletions

View File

@@ -98,6 +98,7 @@ class DrawingEntitySnapTool {
guard let snapCenterLocation = (entityView.superview as? DrawingEntitiesView)?.getEntityCenterPosition() else {
return updatedPosition
}
let isStickerEditor = (entityView.superview as? DrawingEntitiesView)?.isStickerEditor ?? false
let snapEdgeLocations = (entityView.superview as? DrawingEntitiesView)?.getEntityEdgePositions()
let currentTimestamp = CACurrentMediaTime()
@@ -202,7 +203,7 @@ class DrawingEntitySnapTool {
self.yState = updatedYState
self.previousYSnapTimestamp = updatedYPreviousTimestamp
if let snapEdgeLocations {
if let snapEdgeLocations, !isStickerEditor {
if updatedXState == nil {
let (updatedXLeftEdgeValue, updatedLeftEdgeState, updatedLeftEdgePreviousTimestamp) = process(
state: self.leftEdgeState,