| | |
| | | this.app.renderer.events.mapPositionToPoint(startPoint, event.clientX, event.clientY); |
| | | let selectionStart = { x: startPoint.x, y: startPoint.y }; |
| | | |
| | | isSelecting = true; |
| | | // avoid trigger sprite event |
| | | let hasHitSprite = false; |
| | | for (let child of this.mapContainer.children) { |
| | | if (child.data?.uuid) { |
| | | if (child.getBounds().contains(selectionStart.x, selectionStart.y)) { |
| | | hasHitSprite = true; break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (!hasHitSprite) { |
| | | isSelecting = true; |
| | | } |
| | | |
| | | const handleMouseMove = (event) => { |
| | | if (isSelecting && !this.didClickSprite) { |