Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hbcarlos committed Jan 12, 2023
1 parent e360d70 commit bb41b2c
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/toolbar/helpertoolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,24 @@ export class HelpersToolbarReact extends React.Component<IProps, IState> {
}

private _createSchema(): IState {
const axe: AxeHelper = {
size: 5,
visible: false
};
this._panel.setAxes(axe);
let axes = this._panel.getAxes();

if (!axes) {
axes = {
size: 5,
visible: false
};
this._panel.setAxes(axes);
}

return {
Axes: {
title: 'Axes Helper',
shape: 'Axe::Helper',
schema: FORM_SCHEMA,
default: {
Size: axe?.size ?? 5,
Visible: axe?.visible ?? true
Size: axes?.size ?? 5,
Visible: axes?.visible ?? true
},
syncData: (props: IDict) => {
const { Size, Visible } = props;
Expand Down

0 comments on commit bb41b2c

Please sign in to comment.