fix edit button

This commit is contained in:
zadam 2023-01-02 22:32:05 +01:00
parent 115bf0af4d
commit 291ef87c9b
2 changed files with 4 additions and 6 deletions

View File

@ -1,8 +1,8 @@
import NoteContextAwareWidget from "../note_context_aware_widget.js"; import NoteContextAwareWidget from "../note_context_aware_widget.js";
const TPL = `<span class="button-widget bx" const TPL = `<button class="button-widget bx"
data-toggle="tooltip" data-toggle="tooltip"
title=""></span>`; title=""></button>`;
export default class AbstractButtonWidget extends NoteContextAwareWidget { export default class AbstractButtonWidget extends NoteContextAwareWidget {
isEnabled() { isEnabled() {

View File

@ -39,12 +39,10 @@ export default class EditButton extends OnClickButtonWidget {
// make the edit button stand out on the first display, otherwise // make the edit button stand out on the first display, otherwise
// it's difficult to notice that the note is readonly // it's difficult to notice that the note is readonly
if (this.isVisible() && !wasVisible) { if (this.isVisible() && !wasVisible) {
this.$iconSpan.addClass("bx-tada"); this.$widget.addClass("bx-tada bx-lg");
this.$widget.css("transform", "scale(2)");
setTimeout(() => { setTimeout(() => {
this.$iconSpan.removeClass("bx-tada bx-lg"); this.$widget.removeClass("bx-tada bx-lg");
this.$widget.css("transform", "scale(1)");
}, 1700); }, 1700);
} }
} }