mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 16:33:15 +01:00
action info popup
This commit is contained in:
parent
4214715fd6
commit
dfae3bd967
6 changed files with 71 additions and 31 deletions
12
web/app/cad/dom/components/ActionInfo.jsx
Normal file
12
web/app/cad/dom/components/ActionInfo.jsx
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import React from 'react';
|
||||
|
||||
|
||||
|
||||
export default function ActionInfo({children}) {
|
||||
|
||||
return <AuxWidget>
|
||||
{children}
|
||||
</AuxWidget>;
|
||||
}
|
||||
|
||||
|
||||
11
web/app/cad/dom/components/MessageSink.jsx
Normal file
11
web/app/cad/dom/components/MessageSink.jsx
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import React from 'react';
|
||||
|
||||
import AuxWidget from './../../../../../modules/ui/components/AuxWidget';
|
||||
|
||||
export default function MessageSink({children, ...props}) {
|
||||
|
||||
return <AuxWidget {...props}>
|
||||
{children}
|
||||
</AuxWidget>;
|
||||
}
|
||||
|
||||
0
web/app/cad/dom/components/MessageSink.less
Normal file
0
web/app/cad/dom/components/MessageSink.less
Normal file
42
web/app/cad/dom/components/UISystem.jsx
Normal file
42
web/app/cad/dom/components/UISystem.jsx
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import MenuHolder from "../menu/MenuHolder";
|
||||
import {TOKENS as MENU_TOKENS} from '../menu/menuPlugin';
|
||||
|
||||
import WindowSystem from 'ui/WindowSystem';
|
||||
import MessageSink from './MessageSink';
|
||||
|
||||
|
||||
export default class UISystem extends React.Component {
|
||||
|
||||
render() {
|
||||
return <div {...this.props} onMouseDown={this.closeAllUpPopups}>
|
||||
<MenuHolder />
|
||||
<MessageSink />
|
||||
<WindowSystem />
|
||||
{this.props.children}
|
||||
</div>
|
||||
}
|
||||
|
||||
closeAllUpPopups = () => {
|
||||
let openedMenus = this.context.bus.state[MENU_TOKENS.OPENED];
|
||||
if (openedMenus && openedMenus.length !== 0) {
|
||||
this.context.bus.dispatch(MENU_TOKENS.CLOSE_ALL);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
getChildContext() {
|
||||
return {
|
||||
closeAllUpPopups: this.closeAllUpPopups
|
||||
}
|
||||
}
|
||||
|
||||
static contextTypes = {
|
||||
bus: PropTypes.object
|
||||
};
|
||||
|
||||
static childContextTypes = {
|
||||
closeAllUpPopups: PropTypes.func
|
||||
};
|
||||
}
|
||||
|
|
@ -23,21 +23,19 @@ import NumberControl from "ui/components/controls/NumberControl";
|
|||
import ButtonGroup from "ui/components/controls/ButtonGroup";
|
||||
import Button from "ui/components/controls/Button";
|
||||
import TextControl from './../../../../../modules/ui/components/controls/TextControl';
|
||||
import MessageSink from './MessageSink';
|
||||
import UISystem from './UISystem';
|
||||
|
||||
|
||||
export default class View3d extends React.PureComponent {
|
||||
|
||||
render() {
|
||||
return <div className={ls.root} onMouseDown={this.closeAllUpPopups}>
|
||||
<MenuHolder />
|
||||
return <UISystem className={ls.root} >
|
||||
<div className={ls.sideBar}>
|
||||
<ObjectExplorer/>
|
||||
<OperationHistory/>
|
||||
</div>
|
||||
<div className={ls.viewer} id='viewer-container'>
|
||||
{/*<div className={ls.viewer} */}
|
||||
<div>
|
||||
</div>
|
||||
<Abs left='0.8em' top='0.8em' className={ls.leftToolbarGroup}>
|
||||
<PlugableToolbarLeft />
|
||||
<PlugableToolbarLeftSecondary />
|
||||
|
|
@ -64,30 +62,7 @@ export default class View3d extends React.PureComponent {
|
|||
</ButtonGroup>
|
||||
</Stack>
|
||||
</Window>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
closeAllUpPopups = () => {
|
||||
let openedMenus = this.context.bus.state[MENU_TOKENS.OPENED];
|
||||
if (openedMenus && openedMenus.length !== 0) {
|
||||
this.context.bus.dispatch(MENU_TOKENS.CLOSE_ALL);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
getChildContext() {
|
||||
return {
|
||||
closeAllUpPopups: this.closeAllUpPopups
|
||||
</UISystem>
|
||||
}
|
||||
}
|
||||
|
||||
static contextTypes = {
|
||||
bus: PropTypes.object
|
||||
};
|
||||
|
||||
static childContextTypes = {
|
||||
closeAllUpPopups: PropTypes.func
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue