Remove scaling of context menus (#431)

* remove scaling of context menus based on graph scale

* deprecate scale in interface

* Add option to restore old context scaling behaviour

Revert "remove scaling of context menus based on graph scale"

This reverts commit d91ecaa86c671aea272844c3900a18da1af7bf01.

* Update test expectations

---------

Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
This commit is contained in:
bymyself
2025-01-27 01:41:08 -07:00
committed by GitHub
parent f48cbb6a82
commit 9a8c3dff89
4 changed files with 8 additions and 1 deletions

View File

@@ -181,7 +181,9 @@ export class ContextMenu {
root.style.left = left + "px"
root.style.top = top + "px"
if (options.scale) root.style.transform = `scale(${Math.round(options.scale * 4) * 0.25})`
if (LiteGraph.context_menu_scaling && options.scale) {
root.style.transform = `scale(${Math.round(options.scale * 4) * 0.25})`
}
}
addItem(