@@ -8,11 +8,18 @@ import PropTypes from 'prop-types';
8
8
import { Link } from 'react-router-dom' ;
9
9
import classNames from 'classnames' ;
10
10
import { 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' ;
12
18
13
19
import {
14
20
MODE_COMPONENT_SELECTING ,
15
- MODE_COMPONENT_PLACING
21
+ MODE_COMPONENT_PLACING ,
22
+ MODE_SCENE_ROTATE
16
23
} from '../../constants' ;
17
24
import ToolsMenuStyles from './ToolsMenu.style' ;
18
25
import { ComponentCreateMenu } from '../' ;
@@ -53,6 +60,7 @@ class ToolsMenu extends Component {
53
60
const previewPath = `${ basePath } /${ sceneSlug !== 'scene' ? sceneSlug : '' } ` ;
54
61
const selectingPath = `${ basePath } /${ sceneSlug } /${ MODE_COMPONENT_SELECTING } ` ;
55
62
const placingPath = `${ basePath } /${ sceneSlug } /${ MODE_COMPONENT_PLACING } ` ;
63
+ const rotatePath = `${ basePath } /${ sceneSlug } /${ MODE_SCENE_ROTATE } ` ;
56
64
57
65
if ( ! sceneSlug || sceneSlug === 'scene' ) {
58
66
return null ;
@@ -72,7 +80,7 @@ class ToolsMenu extends Component {
72
80
< OpenWith />
73
81
</ Button >
74
82
</ Tooltip >
75
- < Tooltip title = "Select components for editing" placement = "right-start " >
83
+ < Tooltip title = "Select components for editing" placement = "right" >
76
84
< Button
77
85
className = { classNames ( classes . button , classes . link ) }
78
86
variant = "fab"
@@ -99,6 +107,21 @@ class ToolsMenu extends Component {
99
107
< PanTool />
100
108
</ Button >
101
109
</ 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 >
102
125
< Tooltip title = "Create a new component" placement = "right" >
103
126
< Button
104
127
className = { classes . button }
0 commit comments