gutter fix

This commit is contained in:
Jan Jongboom 2011-10-18 14:50:02 +02:00
commit 89dadab29d
2 changed files with 11 additions and 2 deletions

View file

@ -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 {

View file

@ -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();
}
}
};