[New Feature] Selection Toolbox (#2608)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2025-02-17 19:07:49 -05:00
committed by GitHub
parent f7556e0015
commit 79db202925
29 changed files with 220 additions and 15 deletions

View File

@@ -2,6 +2,9 @@
<template>
<div
class="selection-overlay-container pointer-events-none"
:class="{
'show-border': showBorder
}"
:style="style"
v-show="visible"
>
@@ -22,9 +25,12 @@ const canvasStore = useCanvasStore()
const { style, updatePosition } = useAbsolutePosition()
const visible = ref(false)
const showBorder = ref(false)
const positionSelectionOverlay = (canvas: LGraphCanvas) => {
const selectedItems = canvas.selectedItems
showBorder.value = selectedItems.size > 1
if (!selectedItems.size) {
visible.value = false
return
@@ -82,4 +88,8 @@ watch(
.selection-overlay-container > * {
pointer-events: auto;
}
.show-border {
@apply border-dashed rounded-md border-2 border-[var(--border-color)];
}
</style>