#
luxiaotao1123
2024-03-16 d96ce786e1ed6ad4858decd0100bafc53528e8f4
zy-asrs-flow/src/pages/map/player.js
@@ -149,6 +149,9 @@
        this.scale = 1;
        this.app.view.addEventListener('wheel', (event) => {
            event.preventDefault();
            if (this.scale !== this.mapContainer.scale.x) {
                this.scale = this.mapContainer.scale.x;
            }
            const delta = Math.sign(event.deltaY);
@@ -167,7 +170,6 @@
            this.scale = newScale;
            this.mapContainer.scale.set(this.scale);
            console.log(this.scale);
            this.mapContainer.children.forEach(child => {
                // child.scale.set(1 / this.scale); // 防止图标变小
@@ -326,11 +328,12 @@
        if (!this.mapContainer || !this.app) {
            return;
        }
        this.mapContainer.scale.set(1);
        this.mapContainer.position.set(0, 0);
        if (this.mapContainer.children.length === 0) {
            return;
        }
        this.mapContainer.scale.set(1);
        this.mapContainer.position.set(0, 0);
        let minX, maxX, minY, maxY;
        for (let sprite of this.mapContainer.children) {