#
luxiaotao1123
2024-03-05 37921583eafff4a9cbad44c096dba516a1229d1f
zy-asrs-flow/src/pages/map/utils.js
@@ -65,3 +65,21 @@
    }
}
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;
}