From 8d1b668cbc378116da744cb4c7b691c2566708ee Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期四, 29 二月 2024 14:34:15 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/index.css | 4 ++--
zy-asrs-flow/src/pages/map/index.jsx | 13 ++++++-------
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/index.css b/zy-asrs-flow/src/pages/map/index.css
index 738ca59..ce7def3 100644
--- a/zy-asrs-flow/src/pages/map/index.css
+++ b/zy-asrs-flow/src/pages/map/index.css
@@ -1,4 +1,4 @@
-:where(.css-dev-only-do-not-override-o082dn).ant-pro-layout .ant-pro-layout-content {
+.ant-pro-layout .ant-pro-layout-content {
padding-block: 15px;
- padding-inline: 20px;
+ padding-inline: 15px;
}
\ No newline at end of file
diff --git a/zy-asrs-flow/src/pages/map/index.jsx b/zy-asrs-flow/src/pages/map/index.jsx
index f78c4bb..1761be7 100644
--- a/zy-asrs-flow/src/pages/map/index.jsx
+++ b/zy-asrs-flow/src/pages/map/index.jsx
@@ -9,9 +9,10 @@
const [activeMap, setActiveMap] = React.useState('zone')
React.useEffect(() => {
+ console.log(map.current);
const app = new PIXI.Application({
- width: window.innerWidth,
- height: window.innerHeight,
+ // width: window.innerWidth,
+ // height: window.innerHeight,
background: '#1099bb',
antialias: true,
})
@@ -22,18 +23,16 @@
globalThis.__PIXI_APP__ = app;
map.current.appendChild(app.view);
-
+
return () => {
app.destroy(true, true);
}
}, []);
- console.log(1);
-
return (
<>
<Card
- style={{ width: '100%', height: '100%' }}
+ style={{ width: '100%', height: 'calc(100vh - 100px)' }}
tabList={[
{
key: 'zone',
@@ -50,11 +49,11 @@
}}
>
<div
+ style={{ width: '100%', height: '100%' }}
ref={map}
>
</div>
</Card>
-
</>
)
}
--
Gitblit v1.9.1