From d96ce786e1ed6ad4858decd0100bafc53528e8f4 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期六, 16 三月 2024 14:43:00 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/pages/map/player.js |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/player.js b/zy-asrs-flow/src/pages/map/player.js
index fcd26a5..5fff216 100644
--- a/zy-asrs-flow/src/pages/map/player.js
+++ b/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);
 
@@ -325,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) {

--
Gitblit v1.9.1