Closed hbcarlos closed 3 years ago
Added new icons to support themes.
Also changed toolbar buttons to use CommandToolbarButtonComponent
. This introduces an issue when the state of the command changes the button doesn't get updated (see screencast).
Issue when using CommandToolbarButtonComponent
since doesn't have the option actualOnClick
. Some mxClient
actions create a modal dialog that gets close when pressing outside the dialog, ToolbarButton
s trigers the click event on mouse onMouseDown
rather than onClick
and this opens and close the modal when pressing the button.
Using a ToolbarButtonComponent
we can tell the button to trigger the event with the onClick
:
https://github.com/QuantStack/jupyterlab-drawio/blob/e9260dd47c0f96fe16a0d5906a542e27f1551705/src/toolbar.tsx#L32
Screencast of the issue:
Merged :) Thanks @hbcarlos !
Solves #83, #81
Changed undo and redo buttons for testing. We need to create new icons for the rest of the buttons.
This PR tested if is possible to use
CommandToolbarButtonsComponent
and solves the issue with theme and toolbar buttons.