button sliding fix
This commit is contained in:
1 parent
7eeff3bc35
commit
49c5fd308e
1 file changed
+3
-3
@@ -2006,9 +2006,9 @@ import SVGKit
|
|||||||
let captured = widget.capturedTouches.contains(touch)
|
let captured = widget.capturedTouches.contains(touch)
|
||||||
setLock.unlock()
|
setLock.unlock()
|
||||||
if !captured || widget.buttonMode == .regular {return}
|
if !captured || widget.buttonMode == .regular {return}
|
||||||
let needReleaseButton = (isLocation(touch.location(in: superview), in: widget) // for slideToToggle & movable+slidable buttons
|
// let needReleaseButton = (isLocation(touch.location(in: superview), in: widget) // for slideToToggle & movable+slidable buttons
|
||||||
|| widget.buttonMode == .slideAndHold) // for slideAndHold buttons
|
// || widget.buttonMode == .slideAndHold) // for slideAndHold buttons
|
||||||
if needReleaseButton {widget.handleFingerUpOrSlideout(event: event)}
|
widget.handleFingerUpOrSlideout(event: event)
|
||||||
setLock.lock()
|
setLock.lock()
|
||||||
widget.capturedTouches.remove(touch)
|
widget.capturedTouches.remove(touch)
|
||||||
setLock.unlock()
|
setLock.unlock()
|
||||||
|
|||||||
Reference in new issue
Block a user