Various fixes

This commit is contained in:
Ilya Laktyushin
2023-08-01 12:15:13 +02:00
parent 8201e493f3
commit 8068a2490a
3 changed files with 38 additions and 13 deletions

View File

@@ -671,6 +671,12 @@ public final class DrawingEntitiesView: UIView, TGPhotoDrawingEntitiesView {
}
}
}
selectionView.longPressed = { [weak self, weak entityView] in
if let self, let entityView {
let entityViews = self.subviews.filter { $0 is DrawingEntityView }
self.requestedMenuForEntityView(entityView, entityViews.last === entityView)
}
}
entityView.selectionView = selectionView
self.selectionContainerView?.addSubview(selectionView)
}
@@ -1015,6 +1021,7 @@ public class DrawingEntitySelectionView: UIView {
public var tapGestureRecognizer: UITapGestureRecognizer?
var tapped: () -> Void = { }
var longPressed: () -> Void = { }
override init(frame: CGRect) {
super.init(frame: frame)