Permalink
Browse files

gutter fix

  • Loading branch information...
1 parent 9c67add commit 89dadab29d2a405a3f3de3f656120b5c9f15d607 @janjongboom janjongboom committed Oct 18, 2011
Showing with 11 additions and 2 deletions.
  1. +2 −0 lib/ace/css/editor.css
  2. +9 −2 lib/ace/virtual_renderer.js
View
@@ -6,6 +6,8 @@
overflow: hidden;
font-family: 'Monaco', 'Menlo', 'Droid Sans Mono', 'Courier New', monospace;
font-size: 12px;
+ width: 100%;
+ height: 100%;
}
.ace_scroller {
@@ -819,8 +819,15 @@ var VirtualRenderer = function(container, theme) {
// force re-measure of the gutter width
if (_self.$size) {
- _self.$size.width = 0;
- _self.onResize();
+ var checkGutterInitialized = function () {
+ // if offset width larger than 0 than force resize
+ if (_self.$gutter.offsetWidth > 0) {
+ _self.onResize(true);
+ } else {
+ setTimeout(checkGutterInitialized, 50); // try again in 50 ms.
+ }
+ };
+ checkGutterInitialized();
}
}
};

0 comments on commit 89dadab

Please sign in to comment.