mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-12 23:56:36 +08:00
chore: easy delete image
This commit is contained in:
+7
@@ -37,6 +37,13 @@ class DeleteButtonView: UIView {
|
||||
required init?(coder _: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
override func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
|
||||
if bounds.width < 50 || bounds.height < 50 {
|
||||
return bounds.insetBy(dx: -20, dy: -20).contains(point)
|
||||
}
|
||||
return super.point(inside: point, with: event)
|
||||
}
|
||||
|
||||
override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
|
||||
Reference in New Issue
Block a user