From 43fffc8b0d2ea88f379e8c72385bdfb42bb88108 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期六, 16 三月 2024 16:03:54 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/utils.js | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/utils.js b/zy-asrs-flow/src/pages/map/utils.js
index de532ab..58fb2b2 100644
--- a/zy-asrs-flow/src/pages/map/utils.js
+++ b/zy-asrs-flow/src/pages/map/utils.js
@@ -411,20 +411,20 @@
return;
}
- // 鑾峰彇 sprite 鐨勪腑蹇冪偣鍧愭爣
+ mapContainer.scale.set(1);
+ mapContainer.position.set(0, 0);
+
let bounds = sprite.getBounds();
let centerPoint = {
x: bounds.x + bounds.width / 2,
y: bounds.y + bounds.height / 2
};
- // 璁$畻 sprite 搴斿綋骞崇Щ鐨勫儚绱犻噺浠ヨ兘澶熷皢鍏舵斁缃埌灞忓箷涓績
let targetPos = {
- x: app.renderer.width / 2 - centerPoint.x * this.scale,
- y: app.renderer.height / 2 - centerPoint.y * this.scale
+ x: app.renderer.width / 3 - centerPoint.x * mapContainer.scale.x,
+ y: app.renderer.height / 3 - centerPoint.y * mapContainer.scale.y
};
- // 浣跨敤 TWEEDLE.Tween 鍔ㄧ敾搴撲负骞崇Щ杩囩▼娣诲姞杩囨浮鏁堟灉
new TWEEDLE.Tween(mapContainer.position).easing(TWEEDLE.Easing.Quadratic.Out)
- .to(targetPos, 200).start();
+ .to(targetPos, 500).start();
}
\ No newline at end of file
--
Gitblit v1.9.1