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);
|
//this.onRender(change);
|
||||||
//return;
|
//return;
|
||||||
this.changes = this.changes | change;
|
this.changes = this.changes | change;
|
||||||
if (!this.pending) {
|
if (!this.pending && this.changes) {
|
||||||
this.pending = true;
|
this.pending = true;
|
||||||
var _self = this;
|
var _self = this;
|
||||||
event.nextFrame(function() {
|
event.nextFrame(function() {
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
this.$textLayer.addEventListener("changeCharacterSize", function() {
|
this.$textLayer.addEventListener("changeCharacterSize", function() {
|
||||||
_self.updateCharacterSize();
|
_self.updateCharacterSize();
|
||||||
_self.onResize(true);
|
_self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height);
|
||||||
_self._signal("changeCharacterSize");
|
_self._signal("changeCharacterSize");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -1272,10 +1272,11 @@ var VirtualRenderer = function(container, theme) {
|
||||||
clearInterval(this.$timer);
|
clearInterval(this.$timer);
|
||||||
|
|
||||||
_self.session.setScrollTop(steps.shift());
|
_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() {
|
this.$timer = setInterval(function() {
|
||||||
if (steps.length) {
|
if (steps.length) {
|
||||||
_self.session.setScrollTop(steps.shift());
|
_self.session.setScrollTop(steps.shift());
|
||||||
// trick session to think it's already scrolled to not loose toValue
|
|
||||||
_self.session.$scrollTop = toValue;
|
_self.session.$scrollTop = toValue;
|
||||||
} else if (toValue != null) {
|
} else if (toValue != null) {
|
||||||
_self.session.$scrollTop = -1;
|
_self.session.$scrollTop = -1;
|
||||||
|
|
@ -1534,7 +1535,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
this.setStyle = function(style, include) {
|
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) {
|
this.unsetStyle = function(style) {
|
||||||
dom.removeCssClass(this.container, 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
|
* @param {String} cursorStyle A css cursor style
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue