diff --git a/editor/js/tools/collecttool.js b/editor/js/tools/collecttool.js index 55a6b4cda6db33a6d410fbac0458185db65c1482..80b970a38691a0e4ba9ff7b853af35668449563e 100644 --- a/editor/js/tools/collecttool.js +++ b/editor/js/tools/collecttool.js @@ -42,6 +42,9 @@ export default class CollectTool extends Tool { } state.addSelectedItems(hitNodes); this.menu.value(COLLECTION_KEY, state.selectedItems); + + // Show tool as active + state.setTool(this); } onNodeClick(node) { @@ -74,6 +77,10 @@ export default class CollectTool extends Tool { this.menu.value(COLLECTION_KEY, state.selectedItems); } + onBackgroundClick() { + state.clearSelectedItems(); + } + onMenuChange(key, value) { if (key === COLLECTION_KEY && value === undefined) { state.clearSelectedItems();