()
| 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 |
no test coverage detected