stable
This commit is contained in:
parent
fbdac9ebf1
commit
86226ccc94
97 changed files with 5790 additions and 2307 deletions
|
|
@ -125,12 +125,13 @@ function resizeFieldFromWheel(e) {
|
|||
}
|
||||
|
||||
function selectTool(tool) {
|
||||
world.tool = tool;
|
||||
const result = window.TarinaiCommands?.dispatch?.(world, { type: "tool.select", toolId: tool });
|
||||
const activeTool = result?.toolId || world.tool || tool;
|
||||
for (const btn of uiCache.toolButtons) {
|
||||
btn.classList.toggle("selected", btn.dataset.tool === tool);
|
||||
btn.classList.toggle("selected", btn.dataset.tool === activeTool);
|
||||
}
|
||||
syncToolSizeBadges();
|
||||
canvas.style.cursor = tool === "observe" ? "default" : (tool === "pinch" ? "grab" : (tool === "poke" || tool === "delete" ? "pointer" : "crosshair"));
|
||||
canvas.style.cursor = activeTool === "observe" ? "default" : (activeTool === "pinch" ? "grab" : (activeTool === "poke" || activeTool === "delete" ? "pointer" : "crosshair"));
|
||||
}
|
||||
|
||||
function showToast(text) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue