mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-06 08:00:05 +00:00
Ensure click_time is available to custom widgets (#349)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user