update
This commit is contained in:
@@ -54,7 +54,9 @@
|
||||
|
||||
function toggle(index: number) {
|
||||
if (!track.value) return;
|
||||
track.value.toggleUnit(index);
|
||||
if (selectedTool.value === 'track-unit-type') {
|
||||
track.value.toggleUnit(index);
|
||||
}
|
||||
if (track.value.getUnitByIndex(index)?.on) {
|
||||
applyCurrentToolToTrackUnit(index);
|
||||
}
|
||||
@@ -75,10 +77,7 @@
|
||||
track.value?.setStickingType(index, activeStickingType.value);
|
||||
break;
|
||||
case "track-unit-type":
|
||||
track.value?.updateUnit(index, { on: true, type: activeTrackUnitType.value });
|
||||
break;
|
||||
case "eraser":
|
||||
track.value?.setUnitOn(index, false);
|
||||
track.value?.updateUnit(index, { on: activeTrackUnitType.value === null ? false : true, type: activeTrackUnitType.value === null ? undefined : activeTrackUnitType.value });
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user