#
luxiaotao1123
2024-03-15 b4e3ec262788b6254473abc70efdc78b4b7f571f
#
3个文件已修改
14 ■■■■■ 已修改文件
zy-asrs-flow/src/pages/map/index.jsx 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/player.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/utils.js 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/index.jsx
@@ -97,7 +97,10 @@
        };
        window.addEventListener('resize', handleResize);
        Utils.fetchMapData();
        Utils.fetchMapData(intl);
        setTimeout(() => {
            player.adaptScreen();
        }, 200)
    }, []);
    // resize
zy-asrs-flow/src/pages/map/player.js
@@ -325,11 +325,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) {
@@ -343,8 +344,8 @@
        }
        this.scale = Math.min(
            this.app.renderer.width / (maxX - minX) * 0.8,
            this.app.renderer.height / (maxY - minY) * 0.8
            this.app.renderer.width / (maxX - minX) * 0.5,
            this.app.renderer.height / (maxY - minY) * 0.5
        );
        let centerPoint = {
zy-asrs-flow/src/pages/map/utils.js