resize ace editors on toggle of description text

This commit is contained in:
Ralf Teusner
2017-02-03 13:53:32 +01:00
parent 252a6ba5d8
commit 2d5125dfa2

View File

@ -167,6 +167,13 @@ configureEditors: function () {
$('button i.fa-spin').hide(); $('button i.fa-spin').hide();
}, },
resizeAceEditors: function (){
$('.editor').each(function (index, element) {
this.resizeParentOfAceEditor(element);
}.bind(this));
},
resizeParentOfAceEditor: function (element){ resizeParentOfAceEditor: function (element){
// calculate needed size: window height - position of top of button-bar - 60 for bar itself and margins // calculate needed size: window height - position of top of button-bar - 60 for bar itself and margins
var windowHeight = window.innerHeight - $('#editor-buttons').offset().top - 60; var windowHeight = window.innerHeight - $('#editor-buttons').offset().top - 60;
@ -559,6 +566,9 @@ configureEditors: function () {
$('#description-panel').toggleClass('description-panel'); $('#description-panel').toggleClass('description-panel');
$('#description-symbol').toggleClass('fa-chevron-down'); $('#description-symbol').toggleClass('fa-chevron-down');
$('#description-symbol').toggleClass('fa-chevron-right'); $('#description-symbol').toggleClass('fa-chevron-right');
// resize ace editors
this.resizeAceEditors();
}, },