| | |
| | | |
| | | activateMapMultiSelect = (fn) => { |
| | | const mapMultiSelectHandle = (event) => { |
| | | console.log(123); |
| | | |
| | | if (event.button !== 0) { |
| | | return; |
| | | } |
| | |
| | | fn(this.selectedSprites, () => { |
| | | // trigger at end of selectionBox when fn happen mouseup |
| | | this.selectedSprites = []; |
| | | this.activateMapMultiSelect(fn); |
| | | }); |
| | | } |
| | | |
| | |
| | | }); |
| | | } |
| | | |
| | | this.mapContainer.parent.off('mousedown'); |
| | | this.mapContainer.parent.on('mousedown', mapMultiSelectHandle) |
| | | } |
| | | |
| | |
| | | |
| | | resize = (width, height) => { |
| | | this.app.renderer.resize(width, height); |
| | | this.mapContainer.children.forEach((child) => { |
| | | child.x = width / 2; |
| | | child.y = height / 2; |
| | | }); |
| | | } |
| | | |
| | | destroy = () => { |