Skip to content

Commit

Permalink
Merge pull request #412 from axonivy/move-toggle-inscription
Browse files Browse the repository at this point in the history
Move toggle inscription button right of the options button
  • Loading branch information
ivy-lli committed Nov 23, 2023
2 parents 363885c + 30088a1 commit ba18793
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/editor/src/ui-tools/tool-bar/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class OptionsToolButton implements ToolBarButton {
public readonly theme?: () => string,
public readonly icon = IvyIcons.Settings,
public readonly title = 'Settings',
public readonly sorting = 'Z',
public readonly sorting = 'Y',
public readonly action = () => ShowToolBarOptionsMenuAction.create({ customIconState: customIconState, grid: grid, theme: theme }),
public readonly id = 'btn_options_menu',
public readonly location = ToolBarButtonLocation.Right,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ export class ToolBarOptionsMenu implements Menu {
containerElement.appendChild(this.bodyDiv);
this.bodyDiv.appendChild(this.createHeader());
this.bodyDiv.appendChild(this.createOptions());
const optionsBtn = document.querySelector<HTMLDivElement>('#btn_options_menu');
if (optionsBtn) {
const containerWidth = containerElement.offsetWidth;
const buttonCenter = optionsBtn.offsetLeft + optionsBtn.offsetWidth / 2;
this.bodyDiv.style.setProperty('--menu-arrow-pos', `${containerWidth - buttonCenter - 15}px`);
}
return this.bodyDiv;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/inscription/src/inscription/tool-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class InscriptionToolButton implements ToolBarButton {
constructor(
public readonly icon = IvyIcons.PenEdit,
public readonly title = 'Inscription',
public readonly sorting = 'D',
public readonly sorting = 'Z',
public readonly action = () => ToggleInscriptionAction.create(),
public readonly id = 'btn_inscription_toggle',
public readonly location = ToolBarButtonLocation.Right
Expand Down

0 comments on commit ba18793

Please sign in to comment.