| | |
| | | |
| | | // sprites be movable from select box |
| | | // the scale was dynamic |
| | | export const spriteListBeMovable = (selectedSprites, scale, resetFn) => { |
| | | export const spriteListBeMovable = (selectedSprites, resetFn) => { |
| | | if (selectedSprites && selectedSprites.length > 0) { |
| | | let batchMove = false; |
| | | let batchMoveStartPos = null; |
| | | |
| | | const batchMoving = (event) => { |
| | | const scale = mapContainer.scale.x; |
| | | if (batchMove && batchMoveStartPos) { |
| | | // offset move val |
| | | var mouseMovement = { |
| | |
| | | mapContainer.parent.off('mousemove'); |
| | | mapContainer.parent.off('mouseup'); |
| | | |
| | | if (resetFn) { |
| | | resetFn(); |
| | | } |
| | | } |
| | | |
| | | const batchMoveStart = (event) => { |
| | | batchMoveStartPos = { x: event.data.global.clone().x, y: event.data.global.clone().y }; |