Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_texteditor.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-08-28 14:22:41 +0300
committerRobin Appelman <robin@icewind.nl>2017-08-28 14:22:41 +0300
commit6774d3d70116224f1843c0738d5add8612e1cee7 (patch)
tree4f11958252152f23a293e032447af467e6c0553f /js/editor.js
parent5e45a4aec593746c3be5c542d2bb5b1cd80da5c6 (diff)
smooth transitions between preview states
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'js/editor.js')
-rw-r--r--js/editor.js12
1 files changed, 3 insertions, 9 deletions
diff --git a/js/editor.js b/js/editor.js
index ac042ad..835ddea 100644
--- a/js/editor.js
+++ b/js/editor.js
@@ -371,22 +371,16 @@ var Files_Texteditor = {
controlBar.find('button[data-type="' + mode + '"]').addClass('active');
switch (mode) {
case 'mixed':
- container.find('#editor_container').addClass('hasPreview');
+ container.find('#editor_container, #editor_overlay').addClass('hasPreview');
container.find('#editor_container').removeClass('onlyPreview');
- container.find('#editor').show();
- container.find('#preview_wrap').css('width', '50%');
break;
case 'text':
- container.find('#editor_container').removeClass('hasPreview');
+ container.find('#editor_container, #editor_overlay').removeClass('hasPreview');
container.find('#editor_container').removeClass('onlyPreview');
- container.find('#editor').show();
- container.find('#preview_wrap').css('width', '50%');
break;
case 'image':
- container.find('#editor_container').addClass('hasPreview');
+ container.find('#editor_container, #editor_overlay').addClass('hasPreview');
container.find('#editor_container').addClass('onlyPreview');
- container.find('#editor').hide();
- container.find('#preview_wrap').css('width', '100%');
break;
}
},