#
luxiaotao1123
2024-03-21 567cd1ba9e89b4c8193817ae11ec5050a54310ec
zy-asrs-flow/src/pages/map/player.js
@@ -25,7 +25,7 @@
        this.getStartedTicker();
    }
    activateMapEvent = (leftEvent, rightEvent) => {
    activateMapEvent = (eventType, mapModel) => {
        if (this.mapEvent) {
            this.mapContainer.parent.off('mousedown');
            this.mapEvent = null;
@@ -36,17 +36,11 @@
            }
        }
        this.mapEvent = (event) => {
            if (leftEvent && event.button === 0) {
                switch (leftEvent) {
            if (eventType && event.button === 0) {
                switch (eventType) {
                    case Utils.MapEvent.SELECTION_BOX:
                        this.mapSelect(event);
                        this.mapSelect(event, mapModel);
                        break
                    default:
                        break
                }
            }
            if (rightEvent && event.button === 2) {
                switch (rightEvent) {
                    default:
                        break
                }
@@ -55,7 +49,7 @@
        this.mapContainer.parent.on('mousedown', this.mapEvent)
    }
    mapSelect = (event) => {
    mapSelect = (event, mapModel) => {
        let isSelecting = false;
        if (!this.selectionBox) {
            this.selectionBox = new PIXI.Graphics();
@@ -108,6 +102,7 @@
                isSelecting = false;
                this.selectionBox.clear();
                console.log(mapModel);
                // sprites batch move
                Utils.spriteListBeMovable(this.selectedSprites, this.scale, () => {
                    this.activateMapEvent(Utils.MapEvent.SELECTION_BOX);