From 722a6090314d9edd7c1b2587db8ec1adb579b674 Mon Sep 17 00:00:00 2001 From: wmd Date: Fri, 3 Dec 2021 15:48:02 +0800 Subject: [PATCH 1/3] =?UTF-8?q?wmd=E6=B7=BB=E5=8A=A0=E5=8A=A8=E7=94=BB?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/editor/Editor.jsx | 2 +- web/src/editor/assets/AssetsPanel.jsx | 11 +++++++++++ web/src/editor/sidebar/EditorSideBar.jsx | 16 ++++++++-------- web/src/ui/layout/PropertyTabLayout.jsx | 2 +- web/src/ui/timeline/Timeline.jsx | 2 +- web/src/ui/timeline/css/Timeline.css | 3 ++- 6 files changed, 24 insertions(+), 12 deletions(-) diff --git a/web/src/editor/Editor.jsx b/web/src/editor/Editor.jsx index 9d257cfc..e7dead38 100644 --- a/web/src/editor/Editor.jsx +++ b/web/src/editor/Editor.jsx @@ -49,7 +49,7 @@ class Editor extends React.Component { statusBarShow: global.app.storage.statusBarShow }; - this.type = 'scene'; // 编辑器类型:scene, mesh, texture, material, terrain, ai + this.type = 'scene'; // 编辑器类型:scene, mesh, tsexture, material, terrain, ai this.onToggle = this.onToggle.bind(this); } diff --git a/web/src/editor/assets/AssetsPanel.jsx b/web/src/editor/assets/AssetsPanel.jsx index fd248ec8..aa9edfa3 100644 --- a/web/src/editor/assets/AssetsPanel.jsx +++ b/web/src/editor/assets/AssetsPanel.jsx @@ -25,6 +25,7 @@ import VideoPanel from './VideoPanel.jsx'; import LogPanel from './LogPanel.jsx'; import global from '../../global'; import ScriptPanel from './ScriptPanel.jsx'; +import TimelinePanel from "../timeline/TimelinePanel.jsx"; /** * 资源面板 @@ -98,6 +99,16 @@ class AssetsPanel extends React.Component { /> + + + + {!enableAuthority || authorities.includes('LIST_MAP') ? - {/* - */} + {/**/} + ; } -/* + componentDidMount() { global.app.on(`animationSelected.EditorSideBar`, this.handleAnimationSelected); } -*/ + /*handleTopTabChange(index) { this.setState({ @@ -70,11 +70,11 @@ class EditorSideBar extends React.Component { }); } - /* handleAnimationSelected() { + handleAnimationSelected() { this.setState({ - bottomIndex: 2 + bottomIndex: 1 }); - }*/ + } } export default EditorSideBar; \ No newline at end of file diff --git a/web/src/ui/layout/PropertyTabLayout.jsx b/web/src/ui/layout/PropertyTabLayout.jsx index 62bddfd6..163f2256 100644 --- a/web/src/ui/layout/PropertyTabLayout.jsx +++ b/web/src/ui/layout/PropertyTabLayout.jsx @@ -30,7 +30,7 @@ class PropertyTabLayout extends React.Component { >
{React.Children.map(children, (n, i) => { - return
.controls>.IconButton { @@ -40,7 +41,7 @@ position: absolute; width: 100px; height: 32px; - background: #fff; + /*background: #fff;*/ z-index: 10; } -- Gitee From 40ed5b830feea2f910935fcbd026c1ebd14b9c46 Mon Sep 17 00:00:00 2001 From: wmd Date: Fri, 3 Dec 2021 16:50:57 +0800 Subject: [PATCH 2/3] =?UTF-8?q?wmd=E4=BC=98=E5=8C=96=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/editor/Editor.jsx | 1 + web/src/editor/sidebar/EditorSideBar.jsx | 8 ++++++++ web/src/event/EventList.js | 1 + web/src/ui/property/css/PropertyGroup.css | 2 +- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/web/src/editor/Editor.jsx b/web/src/editor/Editor.jsx index e7dead38..5fc8c686 100644 --- a/web/src/editor/Editor.jsx +++ b/web/src/editor/Editor.jsx @@ -385,6 +385,7 @@ class Editor extends React.Component { } global.app.call('objectSelected', this, object); + global.app.call('PropertySelected', this, object); } selectById(id) { // 根据id选中物体 diff --git a/web/src/editor/sidebar/EditorSideBar.jsx b/web/src/editor/sidebar/EditorSideBar.jsx index 1d5f8b6d..ad856cca 100644 --- a/web/src/editor/sidebar/EditorSideBar.jsx +++ b/web/src/editor/sidebar/EditorSideBar.jsx @@ -33,6 +33,7 @@ class EditorSideBar extends React.Component { /*this.handleTopTabChange = this.handleTopTabChange.bind(this);*/ this.handleBottomTabChange = this.handleBottomTabChange.bind(this); this.handleAnimationSelected = this.handleAnimationSelected.bind(this); + this.handlePropertySelected = this.handlePropertySelected.bind(this); } render() { @@ -56,6 +57,7 @@ class EditorSideBar extends React.Component { componentDidMount() { global.app.on(`animationSelected.EditorSideBar`, this.handleAnimationSelected); + global.app.on(`PropertySelected.EditorSideBar`, this.handlePropertySelected); } @@ -75,6 +77,12 @@ class EditorSideBar extends React.Component { bottomIndex: 1 }); } + + handlePropertySelected() { + this.setState({ + bottomIndex: 0 + }); + } } export default EditorSideBar; \ No newline at end of file diff --git a/web/src/event/EventList.js b/web/src/event/EventList.js index 49babf4a..0aaa5f5b 100644 --- a/web/src/event/EventList.js +++ b/web/src/event/EventList.js @@ -114,6 +114,7 @@ const EventList = [ 'resetAnimation', // 重制动画时间轴 'startAnimation', // 开始播放动画 'animationTime', // 时间轴发送当前动画时间 + 'PropertySelected', // 物体选中事件 // 底部面板事件 'selectBottomPanel', // 点击选择某个面板 diff --git a/web/src/ui/property/css/PropertyGroup.css b/web/src/ui/property/css/PropertyGroup.css index c2bbf2db..2d1643ae 100644 --- a/web/src/ui/property/css/PropertyGroup.css +++ b/web/src/ui/property/css/PropertyGroup.css @@ -76,7 +76,7 @@ .PropertyGroup>.content>.property>.label { background-color: rgba(51, 51, 51, 100); - width: 60px; + width: 100px; padding: 0 4px; display: inline-flex; align-items: center; -- Gitee From 5cdc1118420f867360f5715fa585e5ad2fc687fd Mon Sep 17 00:00:00 2001 From: wmd Date: Fri, 3 Dec 2021 16:53:46 +0800 Subject: [PATCH 3/3] =?UTF-8?q?wmd=E5=88=A0=E9=99=A4=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E6=A0=8F=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/editor/sidebar/EditorSideBar.jsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/web/src/editor/sidebar/EditorSideBar.jsx b/web/src/editor/sidebar/EditorSideBar.jsx index ad856cca..708f71ec 100644 --- a/web/src/editor/sidebar/EditorSideBar.jsx +++ b/web/src/editor/sidebar/EditorSideBar.jsx @@ -31,7 +31,7 @@ class EditorSideBar extends React.Component { }; /*this.handleTopTabChange = this.handleTopTabChange.bind(this);*/ - this.handleBottomTabChange = this.handleBottomTabChange.bind(this); + // this.handleBottomTabChange = this.handleBottomTabChange.bind(this); this.handleAnimationSelected = this.handleAnimationSelected.bind(this); this.handlePropertySelected = this.handlePropertySelected.bind(this); } @@ -45,7 +45,7 @@ class EditorSideBar extends React.Component {
*/} {/**/} @@ -66,11 +66,11 @@ class EditorSideBar extends React.Component { topIndex: index }); }*/ - handleBottomTabChange(index) { - this.setState({ - bottomIndex: index - }); - } + // handleBottomTabChange(index) { + // this.setState({ + // bottomIndex: index + // }); + // } handleAnimationSelected() { this.setState({ -- Gitee