1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-08 05:02:02 +03:00

Updated codeblock editor to work with fade animation

- Added fadeIn to animation JS service.
- Updated overlay to use anim service and to recieve a callback for
after-anim actions.
- Updated code editor popup to refresh Codemirror instance layout after
animation has completed.

Fixes #1672
This commit is contained in:
Dan Brown
2019-12-07 16:54:34 +00:00
parent a6bbe46987
commit 5a533fff8b
4 changed files with 37 additions and 23 deletions

View File

@ -3,7 +3,9 @@ import codeLib from "../services/code";
const methods = {
show() {
if (!this.editor) this.editor = codeLib.popupEditor(this.$refs.editor, this.language);
this.$refs.overlay.components.overlay.show();
this.$refs.overlay.components.overlay.show(() => {
codeLib.updateLayout(this.editor);
});
},
hide() {
this.$refs.overlay.components.overlay.hide();