mirror of
https://github.com/codex-team/editor.js
synced 2026-03-17 16:10:07 +01:00
Cleaup in default tunes code
This commit is contained in:
parent
007915179f
commit
ad4b23d9bd
3 changed files with 0 additions and 30 deletions
|
|
@ -23,15 +23,6 @@ export default class DeleteTune implements BlockTune {
|
|||
*/
|
||||
private readonly api: API;
|
||||
|
||||
/**
|
||||
* Styles
|
||||
*/
|
||||
private CSS = {
|
||||
button: 'ce-settings__button',
|
||||
buttonDelete: 'ce-settings__button--delete',
|
||||
buttonConfirm: 'ce-settings__button--confirm',
|
||||
};
|
||||
|
||||
/**
|
||||
* DeleteTune constructor
|
||||
*
|
||||
|
|
@ -63,12 +54,5 @@ export default class DeleteTune implements BlockTune {
|
|||
*/
|
||||
public handleClick(event: MouseEvent): void {
|
||||
this.api.blocks.delete();
|
||||
this.api.toolbar.close();
|
||||
this.api.tooltip.hide();
|
||||
|
||||
/**
|
||||
* Prevent firing ui~documentClicked that can drop currentBlock pointer
|
||||
*/
|
||||
event.stopPropagation();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,12 +27,8 @@ export default class MoveDownTune implements BlockTune {
|
|||
|
||||
/**
|
||||
* Styles
|
||||
*
|
||||
* @type {{wrapper: string}}
|
||||
*/
|
||||
private CSS = {
|
||||
button: 'ce-settings__button',
|
||||
wrapper: 'ce-tune-move-down',
|
||||
animation: 'wobble',
|
||||
};
|
||||
|
||||
|
|
@ -100,8 +96,5 @@ export default class MoveDownTune implements BlockTune {
|
|||
this.api.blocks.move(currentBlockIndex + 1);
|
||||
|
||||
this.api.toolbar.toggleBlockSettings(true);
|
||||
|
||||
/** Hide the Tooltip */
|
||||
this.api.tooltip.hide();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,12 +26,8 @@ export default class MoveUpTune implements BlockTune {
|
|||
|
||||
/**
|
||||
* Styles
|
||||
*
|
||||
* @type {{wrapper: string}}
|
||||
*/
|
||||
private CSS = {
|
||||
button: 'ce-settings__button',
|
||||
wrapper: 'ce-tune-move-up',
|
||||
animation: 'wobble',
|
||||
};
|
||||
|
||||
|
|
@ -108,8 +104,5 @@ export default class MoveUpTune implements BlockTune {
|
|||
this.api.blocks.move(currentBlockIndex - 1);
|
||||
|
||||
this.api.toolbar.toggleBlockSettings(true);
|
||||
|
||||
/** Hide the Tooltip */
|
||||
this.api.tooltip.hide();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue