Ensure click_time is available to custom widgets (#349)

This commit is contained in:
filtered
2024-11-27 05:05:47 +11:00
committed by GitHub
parent ffa2a24cb1
commit f6e885f015

View File

@@ -3103,6 +3103,9 @@ export class LGraphCanvas {
this.adjustMouseEvent(e)
const now = LiteGraph.getTime()
e.click_time = now - this.last_mouseclick
/** The mouseup event occurred near the mousedown event. */
/** Normal-looking click event - mouseUp occurred near mouseDown, without dragging. */
const isClick = pointer.up(e)
@@ -3120,8 +3123,6 @@ export class LGraphCanvas {
return
}
const now = LiteGraph.getTime()
e.click_time = now - this.last_mouseclick
this.last_mouse_dragging = false
this.last_click_position = null