-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
483 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
VERSION = "1.4.1" | ||
VERSION = "1.5" | ||
WEB_DIRECTORY = "./js" | ||
|
||
NODE_CLASS_MAPPINGS= {} | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { app } from "../../scripts/app.js" | ||
|
||
var context_menu | ||
|
||
function autoclose(e) { | ||
if (context_menu?.root?.contains(e.target)) return | ||
close_context_menu() | ||
} | ||
|
||
export function close_context_menu() { | ||
context_menu?.close() | ||
context_menu = null | ||
} | ||
|
||
function _open_context_menu(e, title, values) { | ||
close_context_menu() | ||
const options = { | ||
"title":title, | ||
"event":e, | ||
} | ||
context_menu = LiteGraph.ContextMenu(values, options, app.canvas.getCanvasWindow()) | ||
} | ||
export function open_context_menu(e, title, values) { setTimeout(_open_context_menu, 10, e, title, values) } | ||
|
||
window.addEventListener('click',autoclose) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.