Skip to content

Commit

Permalink
refactor: disable draw region button (#756)
Browse files Browse the repository at this point in the history
  • Loading branch information
stew-ro authored Nov 12, 2020
1 parent 0ddb7f1 commit 8816a85
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/react/components/pages/editorPage/canvasCommandBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,16 @@ export const CanvasCommandBar: React.FunctionComponent<ICanvasCommandBarProps> =
};
commandBarItems = [
layerItem,
{
key: "drawRegion",
text: strings.editorPage.canvas.canvasCommandBar.items.drawRegion,
iconProps: {iconName: "FieldNotChanged"},
toggle: true,
checked: props.drawRegionMode,
className: !props.layers["drawnRegions"] ? "disabled" : "",
onClick: () => props.handleToggleDrawRegionMode(),
disabled: !props.layers["drawnRegions"],
}
// {
// key: "drawRegion",
// text: strings.editorPage.canvas.canvasCommandBar.items.drawRegion,
// iconProps: {iconName: "FieldNotChanged"},
// toggle: true,
// checked: props.drawRegionMode,
// className: !props.layers["drawnRegions"] ? "disabled" : "",
// onClick: () => props.handleToggleDrawRegionMode(),
// disabled: !props.layers["drawnRegions"],
// }
];
if (!props.enableDrawRegion) {
layerItem.subMenuProps.items = layerItem.subMenuProps.items.filter(item => item.key !== "DrawnRegions");
Expand Down

0 comments on commit 8816a85

Please sign in to comment.