fix resize issues
This commit is contained in:
parent
90b2a6cd77
commit
714e1a592c
2 changed files with 10 additions and 4 deletions
|
|
@ -55,7 +55,7 @@ var RenderLoop = function(onRender, win) {
|
|||
//this.onRender(change);
|
||||
//return;
|
||||
this.changes = this.changes | change;
|
||||
if (!this.pending) {
|
||||
if (!this.pending && this.changes) {
|
||||
this.pending = true;
|
||||
var _self = this;
|
||||
event.nextFrame(function() {
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
this.$textLayer.addEventListener("changeCharacterSize", function() {
|
||||
_self.updateCharacterSize();
|
||||
_self.onResize(true);
|
||||
_self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height);
|
||||
_self._signal("changeCharacterSize");
|
||||
});
|
||||
|
||||
|
|
@ -1272,10 +1272,11 @@ var VirtualRenderer = function(container, theme) {
|
|||
clearInterval(this.$timer);
|
||||
|
||||
_self.session.setScrollTop(steps.shift());
|
||||
// trick session to think it's already scrolled to not loose toValue
|
||||
_self.session.$scrollTop = toValue;
|
||||
this.$timer = setInterval(function() {
|
||||
if (steps.length) {
|
||||
_self.session.setScrollTop(steps.shift());
|
||||
// trick session to think it's already scrolled to not loose toValue
|
||||
_self.session.$scrollTop = toValue;
|
||||
} else if (toValue != null) {
|
||||
_self.session.$scrollTop = -1;
|
||||
|
|
@ -1534,7 +1535,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
*
|
||||
**/
|
||||
this.setStyle = function(style, include) {
|
||||
dom.setCssClass(this.container, style, include != false);
|
||||
dom.setCssClass(this.container, style, include !== false);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1545,6 +1546,11 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.unsetStyle = function(style) {
|
||||
dom.removeCssClass(this.container, style);
|
||||
};
|
||||
|
||||
this.setCursorStyle = function(style) {
|
||||
if (this.content.style.cursor != style)
|
||||
this.content.style.cursor = style;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {String} cursorStyle A css cursor style
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue