FIX: resize events for ace were not triggered correctly
This commit is contained in:
parent
7a4e825671
commit
c40ac5abe6
|
@ -37,6 +37,9 @@ export default Ember.Component.extend({
|
|||
// xxx: don't run during qunit tests
|
||||
this.appEvents.off('ace:resize', this, this.resize);
|
||||
}
|
||||
|
||||
$(window).off('ace:resize');
|
||||
|
||||
}.on('willDestroyElement'),
|
||||
|
||||
resize() {
|
||||
|
@ -67,9 +70,14 @@ export default Ember.Component.extend({
|
|||
|
||||
this.$().data('editor', editor);
|
||||
this._editor = editor;
|
||||
|
||||
$(window).off('ace:resize').on('ace:resize', ()=>{
|
||||
this.appEvents.trigger('ace:resize');
|
||||
});
|
||||
|
||||
if (this.appEvents) {
|
||||
// xxx: don't run during qunit tests
|
||||
this.appEvents.on('ace:resize', self, self.resize);
|
||||
this.appEvents.on('ace:resize', ()=>this.resize());
|
||||
}
|
||||
|
||||
if (this.get("autofocus")) {
|
||||
|
|
|
@ -150,6 +150,9 @@ export default Ember.Controller.extend({
|
|||
|
||||
toggleMaximize: function() {
|
||||
this.toggleProperty('maximized');
|
||||
Em.run.next(()=>{
|
||||
this.appEvents.trigger('ace:resize');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue