From cef2b5c7fa9ad9287116ae7d6f07d74499acc388 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期四, 29 二月 2024 15:01:42 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/index.jsx | 26 +++++++++++++++++---------
1 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/index.jsx b/zy-asrs-flow/src/pages/map/index.jsx
index bd3f309..3049c90 100644
--- a/zy-asrs-flow/src/pages/map/index.jsx
+++ b/zy-asrs-flow/src/pages/map/index.jsx
@@ -3,6 +3,12 @@
import * as TWEEDLE from 'tweedle.js';
import { Button, message, Modal, Card } from 'antd';
import './index.css'
+import {
+ FooterToolbar,
+ PageContainer,
+ ProTable,
+ LightFilter,
+} from '@ant-design/pro-components';
const Map = () => {
const mapRef = React.useRef();
@@ -15,14 +21,11 @@
antialias: true,
})
})
- app.stage.interactive = true;
- app.stage.hitArea = app.screen;
- globalThis.__PIXI_APP__ = app;
- mapRef.current.appendChild(app.view);
React.useEffect(() => {
const onResize = () => {
- const width = mapRef.current.offsetWidth;
+ console.log(1);
+ const width = mapRef.current.offsetWidth + 2;
const height = window.innerHeight - 92;
console.log(width, height);
if (mapRef) {
@@ -32,10 +35,15 @@
window.addEventListener('resize', onResize);
onResize();
- return () => {
- app.destroy(true, true);
- window.removeEventListener('resize', onResize);
- }
+ app.stage.interactive = true;
+ app.stage.hitArea = app.screen;
+ globalThis.__PIXI_APP__ = app;
+ mapRef.current.appendChild(app.view);
+
+ // return () => {
+ // app.destroy(true, true);
+ // window.removeEventListener('resize', onResize);
+ // }
}, []);
return (
--
Gitblit v1.9.1