MCPcopy Create free account
hub / github.com/Comfy-Org/litegraph.js / getMenuOptions

Method getMenuOptions

src/LGraphGroup.ts:303–329  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

301 }
302
303 getMenuOptions(): (IContextMenuValue<string> | IContextMenuValue<string | null> | null)[] {
304 return [
305 {
306 content: this.pinned ? "Unpin" : "Pin",
307 callback: () => {
308 if (this.pinned) this.unpin()
309 else this.pin()
310 this.setDirtyCanvas(false, true)
311 },
312 },
313 null,
314 { content: "Title", callback: LGraphCanvas.onShowPropertyEditor },
315 {
316 content: "Color",
317 has_submenu: true,
318 callback: LGraphCanvas.onMenuNodeColors,
319 },
320 {
321 content: "Font size",
322 property: "font_size",
323 type: "Number",
324 callback: LGraphCanvas.onShowPropertyEditor,
325 },
326 null,
327 { content: "Remove", callback: LGraphCanvas.onMenuNodeRemove },
328 ]
329 }
330
331 isPointInTitlebar(x: number, y: number): boolean {
332 const b = this.boundingRect

Callers 4

getCanvasMenuOptionsMethod · 0.80
getNodeMenuOptionsMethod · 0.80
getGroupMenuOptionsMethod · 0.80
processContextMenuMethod · 0.80

Calls 3

unpinMethod · 0.95
pinMethod · 0.95
setDirtyCanvasMethod · 0.45

Tested by

no test coverage detected