-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
effort: little (hours)When the amount of work is littleWhen the amount of work is littletype: bugtype: fix
Description
will be edited for more informations
src/app/editor/editor.component
private updateTool(tool: Command & KindTool) {
// Personalized operation on command
switch (tool.command) {
case "move":
this.drawEdit.enableDraw(false);
this.mapComponent.map.enableMapNavigation();
break;
case "select":
this.drawEdit.enableDraw(false);
this.drawEdit.enableEdit(true);
this.mapComponent.map.disableMapNavigation();
break;
case "delete":
this.drawEdit.enableDraw(false);
this.drawEdit.enableDelete(true);
this.mapComponent.map.disableMapNavigation();
break;
case "fill":
this.drawEdit.changeTexture(
this.toolbarMapComponent.changeFillTool());
break;
case "print":
if (!this.flagSavable)
this.modalYesNoComponent.open();
else
window.print();
break;
case "open":
this.modalMapComponent.open();
break;
case "save":
this.modalSaveMapComponent.open();
break;
default:
console.warn("action buttons not implemented");
}
// Global operation on kind
switch (tool.kind) {
case "draw" :
this.mapComponent.map.disableMapNavigation();
const drawTool = tool as DrawTool;
this.drawEdit.enableDraw(true, drawTool.drawType);
this.drawEdit.enableDelete(false);
this.drawEdit.enableEdit(false);
break;
case "action" :
this.drawEdit.enableDraw(false);
this.drawEdit.enableDelete(false);
this.drawEdit.enableEdit(false);
break;
}
}
tool: {
command : "draw_circle",
drawType : {
kind : "circle",
}
image : "dist/assets/305da58222a2fb9657dedcf576df0df8.png",
kind : "draw",
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
effort: little (hours)When the amount of work is littleWhen the amount of work is littletype: bugtype: fix