diff --git a/src/data/boardUtils.tsx b/src/data/boardUtils.tsx index bb2e576..4b26076 100644 --- a/src/data/boardUtils.tsx +++ b/src/data/boardUtils.tsx @@ -20,7 +20,6 @@ export const resourceLevelFormula = Formula.variable(0) .step(100, x => x.pow(1.5)) .step(Decimal.pow(900, 1.5).add(100), x => x.pow(1.5)) .pow(1.5); -console.log(resourceLevelFormula); export const deselectAllAction = { id: "deselect", diff --git a/src/features/boards/Board.vue b/src/features/boards/Board.vue index 356bca7..3a50ff1 100644 --- a/src/features/boards/Board.vue +++ b/src/features/boards/Board.vue @@ -39,9 +39,11 @@ :dragging="unref(draggingNode)" :dragged="unref(draggingNode) === node ? dragged : undefined" :hasDragged="unref(draggingNode) == null ? false : hasDragged" - :receivingNode="unref(receivingNode)?.id === node.id" - :selectedNode="unref(selectedNode)" - :selectedAction="unref(selectedAction)" + :receivingNode="unref(receivingNode) === node" + :isSelected="unref(selectedNode) === node" + :selectedAction=" + unref(selectedNode) === node ? unref(selectedAction) : null + " @mouseDown="mouseDown" @endDragging="endDragging" @clickAction="(actionId: string) => clickAction(node, actionId)" diff --git a/src/features/boards/BoardNode.vue b/src/features/boards/BoardNode.vue index 2f51013..710f1fb 100644 --- a/src/features/boards/BoardNode.vue +++ b/src/features/boards/BoardNode.vue @@ -163,7 +163,7 @@ const _props = defineProps<{ }; hasDragged?: boolean; receivingNode?: boolean; - selectedNode: BoardNode | null; + isSelected: boolean; selectedAction: GenericBoardNodeAction | null; }>(); const props = toRefs(_props); @@ -173,7 +173,6 @@ const emit = defineEmits<{ (e: "clickAction", actionId: string): void; }>(); -const isSelected = computed(() => unref(props.selectedNode) === unref(props.node)); const isDraggable = computed(() => getNodeProperty(props.nodeType.value.draggable, unref(props.node)) ); @@ -215,7 +214,7 @@ const title = computed(() => getNodeProperty(props.nodeType.value.title, unref(p const subtitle = computed(() => getNodeProperty(props.nodeType.value.subtitle, unref(props.node))); const label = computed( () => - (isSelected.value + (props.isSelected.value ? unref(props.selectedAction) && // eslint-disable-next-line @typescript-eslint/no-non-null-assertion getNodeProperty(unref(props.selectedAction)!.tooltip, unref(props.node))