mirror of
https://github.com/thepaperpilot/Planar-Pioneers.git
synced 2024-11-24 17:31:47 +00:00
Fix nodes appearing in center when selected
This commit is contained in:
parent
e44a43aad5
commit
2f97dbc58d
1 changed files with 2 additions and 5 deletions
|
@ -3,7 +3,7 @@
|
|||
class="boardnode"
|
||||
:class="{ [node.type]: true, isSelected, isDraggable }"
|
||||
:style="{ opacity: dragging?.id === node.id && hasDragged ? 0.5 : 1 }"
|
||||
:transform="`translate(${position.x},${position.y})`"
|
||||
:transform="`translate(${position.x},${position.y})${isSelected ? ' scale(1.2)' : ''}`"
|
||||
>
|
||||
<BoardNodeAction
|
||||
:actions="actions ?? []"
|
||||
|
@ -248,6 +248,7 @@ function mouseDown(e: MouseEvent | TouchEvent) {
|
|||
|
||||
function mouseUp(e: MouseEvent | TouchEvent) {
|
||||
if (!props.hasDragged?.value) {
|
||||
emit("endDragging", props.node.value.id);
|
||||
props.nodeType.value.onClick?.(props.node.value);
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
@ -264,10 +265,6 @@ function mouseUp(e: MouseEvent | TouchEvent) {
|
|||
fill: var(--highlighted);
|
||||
}
|
||||
|
||||
.boardnode.isSelected {
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
.boardnode.isSelected .body {
|
||||
fill: var(--accent1) !important;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue