Skip to content

Commit

Permalink
Fixed a bug from opening editor from PG (#12899)
Browse files Browse the repository at this point in the history
* responsive toggle is correct

* added code back in
  • Loading branch information
amritanarasimhan authored Aug 25, 2022
1 parent 6847dca commit af81da3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class CommandBarComponent extends React.Component<ICommandBarComponentPro
const deleteeIcon = this.props.globalState.selectedControls.length === 0 ? deleteIconDisabled : deleteIcon;
const pasteeIcon = isPasteDisabled ? pasteIconDisabled : pasteIcon;

const responsiveUI = this.props.globalState.fromPG ? DataStorage.ReadBoolean("responsiveUI", true) : DataStorage.ReadBoolean("Responsive", true);
const responsiveUI = this.props.globalState.fromPG ? DataStorage.ReadBoolean("responsiveUI", true) : !DataStorage.ReadBoolean("responsiveUI", true);

this._sizeOption = _sizeValues.findIndex((value) => value.width == size.width && value.height == size.height);
if (this._sizeOption < 0) {
Expand Down Expand Up @@ -248,7 +248,7 @@ export class CommandBarComponent extends React.Component<ICommandBarComponentPro
<CheckBoxLineComponent
label="Responsive:"
iconLabel="Responsive GUIs will resize the UI layout and reflow controls to accommodate different device screen sizes"
isSelected={() => DataStorage.ReadBoolean("Responsive", true)}
isSelected={() => DataStorage.ReadBoolean("responsiveUI", true)}
onSelect={(value: boolean) => {
this.props.globalState.onResponsiveChangeObservable.notifyObservers(value);
DataStorage.WriteBoolean("Responsive", value);
Expand Down

0 comments on commit af81da3

Please sign in to comment.