diff --git a/web/src/command/History.js b/web/src/command/History.js index 0abdb57f7b08147539f05e0fcb294869c5bb7bd6..bf3514cf4c1dcf758232ee7de6144e8f0697adbc 100644 --- a/web/src/command/History.js +++ b/web/src/command/History.js @@ -55,7 +55,6 @@ class History extends Command { cmd.name = optionalName !== undefined ? optionalName : cmd.name; cmd.execute(); cmd.inMemory = true; - this.lastCmdTime = new Date(); // clearing all the redo-commands diff --git a/web/src/editor/Editor.jsx b/web/src/editor/Editor.jsx index d2995d28829b879616e25b12e236fd3bda41e0e4..9d257cfc58c94b20c207ff07c917281356ba7f99 100644 --- a/web/src/editor/Editor.jsx +++ b/web/src/editor/Editor.jsx @@ -314,7 +314,7 @@ class Editor extends React.Component { global.app.call('sceneGraphChanged', this); } - moveObject(object, parent, before) { // 移动物体 + moveObject(object, parent, before) { // 移动物体,父子树中 if (parent === undefined) { parent = this.scene; } diff --git a/web/src/editor/assets/AssetsPanel.jsx b/web/src/editor/assets/AssetsPanel.jsx index e05fd032a741528ee59be7484beea23a3f02cf4c..fd248ec8925fd2eec04d5da4624854fc972a82fe 100644 --- a/web/src/editor/assets/AssetsPanel.jsx +++ b/web/src/editor/assets/AssetsPanel.jsx @@ -19,11 +19,12 @@ import AudioPanel from './AudioPanel.jsx'; import AnimationPanel from './AnimationPanel.jsx'; import ParticlePanel from './ParticlePanel.jsx'; import PrefabPanel from './PrefabPanel.jsx'; -// import CharacterPanel from './CharacterPanel.jsx'; +import CharacterPanel from './CharacterPanel.jsx'; import ScreenshotPanel from './ScreenshotPanel.jsx'; import VideoPanel from './VideoPanel.jsx'; import LogPanel from './LogPanel.jsx'; import global from '../../global'; +import ScriptPanel from './ScriptPanel.jsx'; /** * 资源面板 @@ -87,6 +88,16 @@ class AssetsPanel extends React.Component { /> : null} + + + + {!enableAuthority || authorities.includes('LIST_MAP') ? .toolbar { padding: 2px 4px; + background-color: #E6E6E6; + margin: 0 5px; } .ScriptPanel>.toolbar>.IconButton { diff --git a/web/src/editor/sidebar/window/ScriptWindow.jsx b/web/src/editor/assets/window/ScriptWindow.jsx similarity index 100% rename from web/src/editor/sidebar/window/ScriptWindow.jsx rename to web/src/editor/assets/window/ScriptWindow.jsx diff --git a/web/src/editor/sidebar/window/css/ScriptWindow.css b/web/src/editor/assets/window/css/ScriptWindow.css similarity index 100% rename from web/src/editor/sidebar/window/css/ScriptWindow.css rename to web/src/editor/assets/window/css/ScriptWindow.css diff --git a/web/src/editor/sidebar/EditorSideBar.jsx b/web/src/editor/sidebar/EditorSideBar.jsx index 4906229fdc56349a9e1a944bf716723d8e2aa164..fcdc08bfa22c8cdcdd212c7740af35627cd4f116 100644 --- a/web/src/editor/sidebar/EditorSideBar.jsx +++ b/web/src/editor/sidebar/EditorSideBar.jsx @@ -13,7 +13,7 @@ import { PropertyTabLayout, VBoxLayout } from '../../ui/index'; import HierarchyPanel from './HierarchyPanel.jsx'; import HistoryPanel from './HistoryPanel.jsx'; import PropertyPanel from './PropertyPanel.jsx'; -import ScriptPanel from './ScriptPanel.jsx'; +// import ScriptPanel from './ScriptPanel.jsx'; import AnimationPropertyPanel from './AnimationPropertyPanel.jsx'; import global from '../../global'; diff --git a/web/src/ui/form/PageInput.jsx b/web/src/ui/form/PageInput.jsx index 5b40a15a0c13a0b05523984ff743a3212c023201..4113db8adc75981b43c5b2d5ce5164605ce9d0e0 100644 --- a/web/src/ui/form/PageInput.jsx +++ b/web/src/ui/form/PageInput.jsx @@ -18,6 +18,7 @@ import PropTypes from 'prop-types'; class PageInput extends React.Component { constructor(props) { super(props); + this.ref = React.createRef(); this.handleFocus = this.handleFocus.bind(this); this.handleChange = this.handleChange.bind(this); @@ -30,11 +31,15 @@ class PageInput extends React.Component { let val = value === undefined || value === null ? '' : value; + if(this.ref.current != null){ + this.ref.current.value = val; + } + return {' / ' + _t('{{totalPage}} Pages', {totalPage: totalPage})} {/*{_t('Total {{totalPage}} Pages', {totalPage: totalPage})}*/} @@ -197,7 +197,8 @@ class ImageList extends React.Component { } handleInput(value, name, event) { - event.target.value = value < this.getTotalPage() ? (value > 0 ? value : 1) : this.getTotalPage(); + // event.target.value = value < this.getTotalPage() ? (value > 0 ? value : 1) : this.getTotalPage(); + // console.log(value); this.setState( () => { const totalPage = this.getTotalPage();