Skip to content
This repository was archived by the owner on Feb 5, 2021. It is now read-only.

Commit 46d5ae4

Browse files
Minolimadhukaw
authored andcommitted
Fix drawer and tools positioning
1 parent 8b18e0d commit 46d5ae4

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

components/designer/src/components/DesignerView.js

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import {
4040
import * as PropTypes from "prop-types";
4141
import Divider from "@material-ui/core/Divider";
4242
import Drawer from "@material-ui/core/Drawer";
43-
import Grey from "@material-ui/core/colors/grey";
4443
import DesignerHeader from "./DesignerHeader";
4544
import * as axios from "axios";
4645
import Snackbar from '@material-ui/core/Snackbar';
@@ -82,14 +81,13 @@ const styles = (theme) => ({
8281
},
8382
drawer: {
8483
width: drawerWidth,
85-
flexShrink: 0
84+
flexShrink: 0,
85+
position: "sticky"
8686
},
8787
drawerPaper: {
88-
top: 94,
8988
width: drawerWidth,
9089
borderTopWidth: 1,
91-
borderTopStyle: "solid",
92-
borderTopColor: Grey[200]
90+
position: "inherit"
9391
},
9492
drawerHeader: {
9593
display: "flex",
@@ -101,7 +99,6 @@ const styles = (theme) => ({
10199
},
102100
content: {
103101
flexGrow: 1,
104-
// padding: theme.spacing.unit * 3,
105102
transition: theme.transitions.create("margin", {
106103
easing: theme.transitions.easing.sharp,
107104
duration: theme.transitions.duration.leavingScreen
@@ -173,6 +170,15 @@ const styles = (theme) => ({
173170
back: {
174171
padding: 0,
175172
marginRight: 10
173+
},
174+
actions: {
175+
display: "inline-block"
176+
},
177+
toolGrid: {
178+
display: "contents"
179+
},
180+
toolBtn: {
181+
padding: "5.5px 6px"
176182
}
177183
});
178184

@@ -1054,18 +1060,19 @@ class DesignerView extends React.Component {
10541060
</Grid>
10551061
<Grid item xs={12} md={6}>
10561062
<Grid container spacing={1} direction="row" justify="flex-end" alignItems="center">
1057-
<Grid item>
1063+
<Grid item className={classes.toolGrid}>
10581064
{
10591065
isNodeSelected && (nodeType === "cell" || nodeType === "composite" ||
10601066
nodeType === "gateway" || nodeType === "component")?
1061-
(<ButtonGroup size="small" aria-label="small outlined button group">
1067+
(<ButtonGroup size="small" aria-label="small outlined button group"
1068+
className={classes.actions}>
10621069
<Tooltip title="Increase size" placement="bottom">
1063-
<Button onClick={this.increaseSize}>
1070+
<Button onClick={this.increaseSize} className={classes.toolBtn}>
10641071
<img alt="increase size" src={require('../icons/increase-size.svg')}
10651072
height={15}/>
10661073
</Button>
10671074
</Tooltip>
1068-
<Tooltip title="Decrease size" placement="bottom">
1075+
<Tooltip title="Decrease size" placement="bottom" className={classes.toolBtn}>
10691076
<Button onClick={this.decreaseSize}>
10701077
<img alt="decrease size" src={require('../icons/decrease-size.svg')}
10711078
height={15}/>

0 commit comments

Comments
 (0)