[Refactor] Make node badge a vue component (#1317)

* [Refactor] Make node badge a vue component

* Simplify badge logic

* nit
This commit is contained in:
Chenlei Hu
2024-10-26 15:28:14 -04:00
committed by GitHub
parent ef4179a06c
commit 645897f8b8
6 changed files with 115 additions and 153 deletions

View File

@@ -106,7 +106,6 @@ const canvasEventHandler = (event: LiteGraphCanvasEvent) => {
const [x, y] = group.pos
const e = event.detail.originalEvent
// @ts-expect-error LiteGraphCanvasEvent is not typed
const relativeY = e.canvasY - y
// Only allow editing if the click is on the title bar
if (relativeY > group.titleHeight) {