fix osw tool outbounds issue again
This commit is contained in:
1 parent
074a31606c
commit
80f9118c0d
2 files changed
+4
-4
No files matched your search
@@ -1138,8 +1138,8 @@ import UIKit
|
|||||||
let offsetX = currentLocation.x - latestTouchLocation.x;
|
let offsetX = currentLocation.x - latestTouchLocation.x;
|
||||||
let offsetY = currentLocation.y - latestTouchLocation.y;
|
let offsetY = currentLocation.y - latestTouchLocation.y;
|
||||||
|
|
||||||
let outOfBoundsX = center.x+offsetX > (self.superview?.bounds.width)! || center.x+offsetX < 0
|
let outOfBoundsX = center.x+offsetX >= (self.superview?.bounds.width)! || center.x+offsetX < 0
|
||||||
let outOfBoundsY = center.y+offsetY > (self.superview?.bounds.height)! || center.y+offsetY < 0
|
let outOfBoundsY = center.y+offsetY >= (self.superview?.bounds.height)! || center.y+offsetY < 0
|
||||||
|
|
||||||
center = CGPoint(x: outOfBoundsX ? center.x : center.x+offsetX, y: outOfBoundsY ? center.y : center.y+offsetY)
|
center = CGPoint(x: outOfBoundsX ? center.x : center.x+offsetX, y: outOfBoundsY ? center.y : center.y+offsetY)
|
||||||
|
|
||||||
|
|||||||
@@ -295,13 +295,13 @@
|
|||||||
"zh-Hant" : {
|
"zh-Hant" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
"state" : "translated",
|
"state" : "translated",
|
||||||
"value" : "[ 開啟螢幕小工具 ]"
|
"value" : "[ 調整螢幕小工具版面配置 ]"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"zh-HK" : {
|
"zh-HK" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
"state" : "translated",
|
"state" : "translated",
|
||||||
"value" : "[ 開啟螢幕小工具 ]"
|
"value" : "[ 調整螢幕小工具版面配置 ]"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user