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

Commit b2024c1

Browse files
committed
fix(ace): resize editor when its width/height changes
Merge branch 'ricochet1k-master' Closes #26
2 parents a21e3bd + 21f26dc commit b2024c1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/ui-ace.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ angular.module('ui.ace', [])
9898
acee.session.$stopWorker();
9999
acee.destroy();
100100
});
101+
102+
scope.$watch(function() {
103+
return [elm[0].offsetWidth, elm[0].offsetHeight];
104+
}, function() {
105+
acee.resize();
106+
acee.renderer.updateFull();
107+
}, true);
101108
}
102109
};
103110
}]);

0 commit comments

Comments
 (0)