Skip to content

Commit

Permalink
chore: keep dropdown open on click
Browse files Browse the repository at this point in the history
  • Loading branch information
VsevolodX committed Sep 14, 2023
1 parent 7f133a3 commit d4709ea
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/components/ThreeDEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ export class ThreeDEditor extends React.Component {
leftIcon: <ThreeDRotation />,
rightIcon: this.getCheckmark(this._getWaveProperty("areOrbitControlsEnabled")),
onClick: this.handleToggleOrbitControls,
shouldMenuStayOpened: true,
},
{
id: "auto-rotate",
Expand All @@ -452,6 +453,7 @@ export class ThreeDEditor extends React.Component {
this._getWaveProperty("isOrbitControlsAnimationEnabled"),
),
onClick: this.handleToggleOrbitControlsAnimation,
shouldMenuStayOpened: true,
},
{
id: "toggle-axes",
Expand All @@ -460,6 +462,7 @@ export class ThreeDEditor extends React.Component {
leftIcon: <GpsFixed />,
rightIcon: this.getCheckmark(this._getWaveProperty("areAxesEnabled")),
onClick: this.handleToggleAxes,
shouldMenuStayOpened: true,
},
{
id: "toggle-camera",
Expand All @@ -468,6 +471,7 @@ export class ThreeDEditor extends React.Component {
leftIcon: <SwitchCamera />,
rightIcon: this.getCheckmark(this._getWaveProperty("isCameraOrthographic")),
onClick: this.handleToggleOrthographicCamera,
shouldMenuStayOpened: true,
},
{
id: "toggle-bonds",
Expand All @@ -476,6 +480,7 @@ export class ThreeDEditor extends React.Component {
leftIcon: <Dehaze />,
rightIcon: this.getCheckmark(this._getWaveProperty("isDrawBondsEnabled")),
onClick: this.handleToggleBonds,
shouldMenuStayOpened: true,
},
{
id: "toggle-cell",
Expand All @@ -484,6 +489,7 @@ export class ThreeDEditor extends React.Component {
leftIcon: <FormatShapes />,
rightIcon: this.getCheckmark(isConventionalCellShown),
onClick: this.handleToggleConventionalCell,
shouldMenuStayOpened: true,
},
{
id: "toggle-labels",
Expand All @@ -492,6 +498,7 @@ export class ThreeDEditor extends React.Component {
leftIcon: <Spellcheck />,
rightIcon: this.getCheckmark(this._getWaveProperty("areLabelsShown")),
onClick: this.handleToggleLabels,
shouldMenuStayOpened: true,
},
{
id: "toggle-view-adjustment",
Expand All @@ -500,6 +507,7 @@ export class ThreeDEditor extends React.Component {
leftIcon: <ControlCameraRounded />,
rightIcon: this.getCheckmark(viewerSettings.isViewAdjustable),
onClick: this.handleToggleIsViewAdjustable,
shouldMenuStayOpened: true,
},
{
id: "divider-2",
Expand All @@ -511,6 +519,7 @@ export class ThreeDEditor extends React.Component {
content: "Reset View [R]",
leftIcon: <Replay />,
onClick: this.handleResetViewer,
shouldMenuStayOpened: true,
},
];
};
Expand All @@ -525,19 +534,22 @@ export class ThreeDEditor extends React.Component {
rightIcon: this.getCheckmark(isDistanceShown),
leftIcon: <HeightIcon />,
onClick: this.handleToggleDistanceShown,
shouldMenuStayOpened: true,
},
{
id: "Angles",
content: "Angles [A]",
rightIcon: this.getCheckmark(isAnglesShown),
leftIcon: <LooksIcon />,
onClick: this.handleToggleAnglesShown,
shouldMenuStayOpened: true,
},
{
id: "Delete",
content: "Delete connection [X]",
leftIcon: <DeleteIcon />,
onClick: this.handleDeleteConnection,
shouldMenuStayOpened: true,
},
{
id: "divider-actions",
Expand All @@ -548,6 +560,7 @@ export class ThreeDEditor extends React.Component {
content: "Reset Measures",
leftIcon: <Replay />,
onClick: this.handleResetMeasures,
shouldMenuStayOpened: true,
},
];
};
Expand Down Expand Up @@ -614,7 +627,6 @@ export class ThreeDEditor extends React.Component {
id: "Parameters",
title: "Parameters",
header: "Parameters",
shouldMenuStayOpened: true,
leftIcon: <Settings />,
contentObject: this.getParametersActions(),
onClick: () => this.handleToggleToolbarMenu("parameters"),
Expand Down

0 comments on commit d4709ea

Please sign in to comment.