diff --git a/src/components/SketcherToolbars.js b/src/components/SketcherToolbars.js index 21584a9..1733c18 100644 --- a/src/components/SketcherToolbars.js +++ b/src/components/SketcherToolbars.js @@ -8,6 +8,7 @@ import MenuItem from '../components/MenuItem.js'; import * as contextTools from '../constants/contextTools.js'; import * as d2Tools from '../constants/d2Tools.js'; import { createSelector } from 'reselect'; +import injectSheet from 'react-jss'; // import createDebug from 'debug'; // const debug = createDebug('d3d:sketchertoolbars'); @@ -15,6 +16,23 @@ const TOOLBAR2D = 'toolbar2d'; const TOOLBAR3D = 'toolbar3d'; const CONTEXT = 'context'; +const styles = { + contextMenuContainer: { + position: 'absolute', + left: 0, + bottom: 0, + right: 0, + top: 0, + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + pointerEvents: 'none', /* enable clicking through object */ + '& *': { + pointerEvents: 'visible' /* enable clicking in children */ + } + } +} + class SketcherToolbars extends React.Component { static propTypes = { @@ -78,7 +96,7 @@ class SketcherToolbars extends React.Component { ); }; render() { - const { toolbar2d, toolbar3d, context } = this.props; + const { toolbar2d, toolbar3d, context, classes } = this.props; return (