Restyle the panel on ComfyUI palette tokens and drop the built-in themes. Add a header with Back/Forward, Prev/Next, Focus, Lock and a searchable Go to node picker, a subgraph/group breadcrumb, and simplified modes: Follow glass or Float, plus Sticky, Follow selection and Lock to node (replaces Hold). Fix widget edits (step2 steps, INT/FLOAT, commit on Enter/blur, undo), subgraph lookups, orphaned dropdown menus, global arrow-key capture, the pop-out editor, and remove Google Fonts loading and dead code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
92 lines
1.9 KiB
JavaScript
92 lines
1.9 KiB
JavaScript
const GLASS_POSITIONS = [
|
|
"Top",
|
|
"Bottom",
|
|
"Left",
|
|
"Right",
|
|
"Top-Left",
|
|
"Top-Right",
|
|
"Bottom-Left",
|
|
"Bottom-Right"
|
|
];
|
|
const GLASS_SHAPES = [
|
|
"Circle",
|
|
"Square",
|
|
"Rounded Square"
|
|
];
|
|
const PANEL_POSITIONS = [
|
|
"Top",
|
|
"Bottom",
|
|
"Left",
|
|
"Right"
|
|
];
|
|
const PANEL_FONTS = [
|
|
"System Default",
|
|
"Inter",
|
|
"Roboto",
|
|
"JetBrains Mono",
|
|
"Fira Code",
|
|
"IBM Plex Sans",
|
|
"Space Grotesk",
|
|
"Lexend",
|
|
"Outfit",
|
|
"Cinzel",
|
|
"Playfair Display",
|
|
"Orbitron",
|
|
"Dancing Script",
|
|
"Amatic SC",
|
|
"Comfortaa",
|
|
"Righteous",
|
|
"Bangers",
|
|
"Press Start 2P",
|
|
"Audiowide",
|
|
"monospace"
|
|
];
|
|
const ACTIVATION_KEYS = ["x", "z", "m", "q", "v", "c"];
|
|
const RESET_KEYS = ["r", "o", "p", "k", "l"];
|
|
const TOGGLE_FOLLOW_KEYS = ["f", "g", "h", "j", "k"];
|
|
const DIRECT_CAPTURE_KEYS = ["d", "s", "a", "q", "e"];
|
|
const DEFAULT_PADDING = 4;
|
|
const DEFAULT_GLASS_Y_OFFSET = 198;
|
|
const DEFAULT_GLASS_SIZE = 300;
|
|
const DEFAULT_ZOOM_FACTOR = 300;
|
|
const DEFAULT_BORDER_WIDTH = 1;
|
|
const DEFAULT_BORDER_COLOR = "#6b7280";
|
|
const DEFAULT_OFFSET_STEP = 5;
|
|
const DEFAULT_PANEL_WIDTH = 300;
|
|
const DEFAULT_PANEL_MAX_HEIGHT = 600;
|
|
const DEFAULT_PANEL_OPACITY = 100;
|
|
const INFO_PANEL_ID = "comfyui-magnify-info-panel-pro-v2";
|
|
const Z_INDEX = {
|
|
GLASS: 98999
|
|
};
|
|
const STORAGE_KEYS = {
|
|
OFFSET_X: "comfyui_magnify_offset_x",
|
|
OFFSET_Y: "comfyui_magnify_offset_y",
|
|
INSPECTOR_LAYOUT: "comfyui_magnify_inspector_layout"
|
|
};
|
|
const BROADCAST_CHANNEL_NAME = "comfyui-magnifyglass-popout";
|
|
export {
|
|
ACTIVATION_KEYS,
|
|
BROADCAST_CHANNEL_NAME,
|
|
DEFAULT_BORDER_COLOR,
|
|
DEFAULT_BORDER_WIDTH,
|
|
DEFAULT_GLASS_SIZE,
|
|
DEFAULT_GLASS_Y_OFFSET,
|
|
DEFAULT_OFFSET_STEP,
|
|
DEFAULT_PADDING,
|
|
DEFAULT_PANEL_MAX_HEIGHT,
|
|
DEFAULT_PANEL_OPACITY,
|
|
DEFAULT_PANEL_WIDTH,
|
|
DEFAULT_ZOOM_FACTOR,
|
|
DIRECT_CAPTURE_KEYS,
|
|
GLASS_POSITIONS,
|
|
GLASS_SHAPES,
|
|
INFO_PANEL_ID,
|
|
PANEL_FONTS,
|
|
PANEL_POSITIONS,
|
|
RESET_KEYS,
|
|
STORAGE_KEYS,
|
|
TOGGLE_FOLLOW_KEYS,
|
|
Z_INDEX
|
|
};
|