zy-asrs-flow/src/pages/map/utils.js
@@ -64,4 +64,22 @@ } } } export const isSpriteInSelectionBox = (sprite, selectionBox) => { const spriteBounds = sprite.getBounds(); const boxBounds = selectionBox.getBounds(); return spriteBounds.x + spriteBounds.width > boxBounds.x && spriteBounds.x < boxBounds.x + boxBounds.width && spriteBounds.y + spriteBounds.height > boxBounds.y && spriteBounds.y < boxBounds.y + boxBounds.height; } export const markSprite = (sprite) => { sprite.alpha = 0.5; } export const unMarkSprite = (sprite) => { sprite.alpha = 1; }