mirror of
https://github.com/danbee/persephone
synced 2025-03-04 08:39:11 +00:00
We need to reset these on mouse up
This commit is contained in:
parent
cbe4d703a3
commit
81200742df
@ -20,13 +20,18 @@ class AlbumCoverButton: NSButton {
|
||||
override func mouseDragged(with event: NSEvent) {
|
||||
deltaX = deltaX + event.deltaX
|
||||
deltaY = deltaY + event.deltaY
|
||||
|
||||
if (deltaX > 5 || deltaX < -5 || deltaY > 5 || deltaY < -5) {
|
||||
dragging = true
|
||||
}
|
||||
|
||||
nextResponder?.mouseDragged(with: event)
|
||||
}
|
||||
|
||||
override func mouseUp(with event: NSEvent) {
|
||||
deltaX = 0
|
||||
deltaY = 0
|
||||
|
||||
if dragging {
|
||||
dragging = false
|
||||
nextResponder?.mouseUp(with: event)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user