@@ -8,11 +8,18 @@ import PropTypes from 'prop-types';
88import { Link } from 'react-router-dom' ;
99import classNames from 'classnames' ;
1010import { withStyles , Button , Tooltip } from '@material-ui/core' ;
11- import { OpenWith , TouchApp , PanTool , AddCircle } from '@material-ui/icons' ;
11+ import {
12+ OpenWith ,
13+ TouchApp ,
14+ PanTool ,
15+ AddCircle ,
16+ RotateLeft
17+ } from '@material-ui/icons' ;
1218
1319import {
1420 MODE_COMPONENT_SELECTING ,
15- MODE_COMPONENT_PLACING
21+ MODE_COMPONENT_PLACING ,
22+ MODE_SCENE_ROTATE
1623} from '../../constants' ;
1724import ToolsMenuStyles from './ToolsMenu.style' ;
1825import { ComponentCreateMenu } from '../' ;
@@ -53,6 +60,7 @@ class ToolsMenu extends Component {
5360 const previewPath = `${ basePath } /${ sceneSlug !== 'scene' ? sceneSlug : '' } ` ;
5461 const selectingPath = `${ basePath } /${ sceneSlug } /${ MODE_COMPONENT_SELECTING } ` ;
5562 const placingPath = `${ basePath } /${ sceneSlug } /${ MODE_COMPONENT_PLACING } ` ;
63+ const rotatePath = `${ basePath } /${ sceneSlug } /${ MODE_SCENE_ROTATE } ` ;
5664
5765 if ( ! sceneSlug || sceneSlug === 'scene' ) {
5866 return null ;
@@ -72,7 +80,7 @@ class ToolsMenu extends Component {
7280 < OpenWith />
7381 </ Button >
7482 </ Tooltip >
75- < Tooltip title = "Select components for editing" placement = "right-start " >
83+ < Tooltip title = "Select components for editing" placement = "right" >
7684 < Button
7785 className = { classNames ( classes . button , classes . link ) }
7886 variant = "fab"
@@ -99,6 +107,21 @@ class ToolsMenu extends Component {
99107 < PanTool />
100108 </ Button >
101109 </ Tooltip >
110+ < Tooltip
111+ title = "Set the rotation of this scene's sky image."
112+ placement = "right"
113+ >
114+ < Button
115+ className = { classNames ( classes . button , classes . link ) }
116+ variant = "fab"
117+ component = { Link }
118+ disabled = { location === rotatePath }
119+ color = "primary"
120+ to = { rotatePath }
121+ >
122+ < RotateLeft />
123+ </ Button >
124+ </ Tooltip >
102125 < Tooltip title = "Create a new component" placement = "right" >
103126 < Button
104127 className = { classes . button }
0 commit comments