Skip to content

Commit

Permalink
refacto toolbar v2
Browse files Browse the repository at this point in the history
  • Loading branch information
jparez committed Jan 23, 2025
1 parent 70c7a0e commit a575baf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/DeviceRendererFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,7 @@ module.exports = class DeviceRendererFactory {

instance.toolbarManager.buttonRegistry.forEach((value, key) => {
const order = orderMap.get(key);
// eslint-disable-next-line no-undefined
if (order !== undefined) {
if (typeof order !== 'undefined') {
orderedButtons.push({key, value, order});
} else {
unorderedButtons.push({key, value});
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/util/ToolBarManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ class ToolbarManager {
}

if (isActive) {
buttonData.button.classList.add('gm-active');
buttonData.buttonIcon.classList.add('gm-active');
} else {
buttonData.button.classList.remove('gm-active');
buttonData.buttonIcon.classList.remove('gm-active');
}
}

Expand Down

0 comments on commit a575baf

Please sign in to comment.