widget layout tool minor fixes

This commit is contained in:
TrueZhuanjia committed 2025-09-12 17:03:40 +08:00
1 parent 3ec53c29d4
commit a4951309d3
2 files changed
+19 -1

No files matched your search

+6
View File
@@ -1307,6 +1307,12 @@ import UIKit
let currentLocation: CGPoint
if OnScreenWidgetView.editMode {currentLocation = touch.location(in: superview)}
else {currentLocation = touch.location(in: self)}
if !firstTouchMoved {
// First move event
self.latestTouchLocation = currentLocation
self.firstTouchMoved = true
}
let offsetX = currentLocation.x - latestTouchLocation.x;
let offsetY = currentLocation.y - latestTouchLocation.y;