pull back changes from cloud9
This commit is contained in:
parent
cc0b6386aa
commit
1400d82d34
8 changed files with 31 additions and 35 deletions
|
|
@ -33,7 +33,6 @@ define(function(require, exports, module) {
|
|||
|
||||
var oop = require("./lib/oop");
|
||||
var dom = require("./lib/dom");
|
||||
var event = require("./lib/event");
|
||||
var useragent = require("./lib/useragent");
|
||||
var config = require("./config");
|
||||
var GutterLayer = require("./layer/gutter").Gutter;
|
||||
|
|
@ -159,7 +158,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
bottom: 0,
|
||||
v: 0,
|
||||
h: 0
|
||||
}
|
||||
};
|
||||
|
||||
this.$loop = new RenderLoop(
|
||||
this.$renderChanges.bind(this),
|
||||
|
|
@ -311,7 +310,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.onResize = function(force, gutterWidth, width, height) {
|
||||
if (this.resizing > 2)
|
||||
return;
|
||||
else if (this.resizing > 1)
|
||||
else if (this.resizing > 0)
|
||||
this.resizing++;
|
||||
else
|
||||
this.resizing = force ? 1 : 0;
|
||||
|
|
@ -338,7 +337,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
};
|
||||
|
||||
this.$updateCachedSize = function(force, gutterWidth, width, height) {
|
||||
var changes = this.$changes || 0;
|
||||
var changes = 0;
|
||||
var size = this.$size;
|
||||
if (height && (force || size.height != height)) {
|
||||
size.height = height;
|
||||
|
|
@ -360,7 +359,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
changes = this.CHANGE_SIZE;
|
||||
size.width = width;
|
||||
|
||||
var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;
|
||||
gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;
|
||||
this.scrollBarH.element.style.left =
|
||||
this.scroller.style.left = gutterWidth + "px";
|
||||
size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth());
|
||||
|
|
@ -373,11 +372,19 @@ var VirtualRenderer = function(container, theme) {
|
|||
if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force)
|
||||
changes = changes | this.CHANGE_FULL;
|
||||
}
|
||||
|
||||
if (changes)
|
||||
this._signal("resize");
|
||||
|
||||
if (this.$changes) {
|
||||
changes |= this.$changes;
|
||||
this.$changes = 0;
|
||||
}
|
||||
|
||||
return changes;
|
||||
};
|
||||
|
||||
this.onGutterResize = function() {
|
||||
var width = this.$size.width;
|
||||
var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;
|
||||
this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue