mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-24 00:09:32 +00:00
[Doc] Add JSDoc linter & general comment clean up (#611)
- Prefer comments above lines over end-of-line comments - Makes auto-formatting easier - Subjective, but it is generally easier to read in JS - Standardises JSdoc format - Auto-fixes for many issues (applies on save w/ESLint extension)
This commit is contained in:
@@ -78,7 +78,8 @@ export class ContextMenu {
|
||||
root.style.pointerEvents = "none"
|
||||
setTimeout(function () {
|
||||
root.style.pointerEvents = "auto"
|
||||
}, 100) // delay so the mouse up event is not caught by this element
|
||||
// delay so the mouse up event is not caught by this element
|
||||
}, 100)
|
||||
|
||||
// this prevents the default context browser menu to open in case this menu was created when pressing right button
|
||||
LiteGraph.pointerListenerAdd(
|
||||
@@ -348,7 +349,7 @@ export class ContextMenu {
|
||||
params: MouseEvent,
|
||||
): CustomEvent {
|
||||
const evt = document.createEvent("CustomEvent")
|
||||
evt.initCustomEvent(event_name, true, true, params) // canBubble, cancelable, detail
|
||||
evt.initCustomEvent(event_name, true, true, params)
|
||||
if (element.dispatchEvent) element.dispatchEvent(evt)
|
||||
// @ts-expect-error
|
||||
else if (element.__events) element.__events.dispatchEvent(evt)
|
||||
|
||||
Reference in New Issue
Block a user