Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Commit

Permalink
resize editor when its width/height changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ricochet1k committed Jan 4, 2014
1 parent a21e3bd commit 21f26dc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ui-ace.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ angular.module('ui.ace', [])
acee.session.$stopWorker();
acee.destroy();
});

scope.$watch(function() {
return [elm[0].offsetWidth, elm[0].offsetHeight];
}, function() {
acee.resize();
acee.renderer.updateFull();
}, true);
}
};
}]);

0 comments on commit 21f26dc

Please sign in to comment.