package
This commit is contained in:
parent
2814203c33
commit
21a07bd793
7 changed files with 63 additions and 34 deletions
|
|
@ -24677,7 +24677,9 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.scrollLeft = 0;
|
this.scrollLeft = 0;
|
||||||
|
|
||||||
event.addListener(this.scroller, "scroll", function() {
|
event.addListener(this.scroller, "scroll", function() {
|
||||||
_self.session.setScrollLeft(_self.scroller.scrollLeft);
|
var scrollLeft = _self.scroller.scrollLeft;
|
||||||
|
_self.scrollLeft = scrollLeft;
|
||||||
|
_self.session.setScrollLeft(scrollLeft);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.cursorPos = {
|
this.cursorPos = {
|
||||||
|
|
@ -24976,7 +24978,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$renderChanges = function(changes) {
|
this.$renderChanges = function(changes) {
|
||||||
if (!changes || !this.session)
|
if (!changes || !this.session || !this.container.offsetWidth)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// text, scrolling and resize changes can cause the view port size to change
|
// text, scrolling and resize changes can cause the view port size to change
|
||||||
|
|
@ -24989,13 +24991,19 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$computeLayerConfig();
|
this.$computeLayerConfig();
|
||||||
|
|
||||||
// horizontal scrolling
|
// horizontal scrolling
|
||||||
if (changes & this.CHANGE_H_SCROLL)
|
if (changes & this.CHANGE_H_SCROLL) {
|
||||||
this.scroller.scrollLeft = this.scrollLeft
|
this.scroller.scrollLeft = this.scrollLeft;
|
||||||
|
|
||||||
|
// read the value after writing it since the value might get clipped
|
||||||
|
var scrollLeft = this.scroller.scrollLeft;
|
||||||
|
this.scrollLeft = scrollLeft;
|
||||||
|
this.session.setScrollLeft(scrollLeft);
|
||||||
|
}
|
||||||
|
|
||||||
// full
|
// full
|
||||||
if (changes & this.CHANGE_FULL) {
|
if (changes & this.CHANGE_FULL) {
|
||||||
this.$textLayer.checkForSizeChanges();
|
this.$textLayer.checkForSizeChanges();
|
||||||
// update scrollbar first to not loose scroll position when gutter calls resize
|
// update scrollbar first to not lose scroll position when gutter calls resize
|
||||||
this.$updateScrollBar();
|
this.$updateScrollBar();
|
||||||
this.$textLayer.update(this.layerConfig);
|
this.$textLayer.update(this.layerConfig);
|
||||||
if (this.showGutter)
|
if (this.showGutter)
|
||||||
|
|
@ -25277,10 +25285,9 @@ var VirtualRenderer = function(container, theme) {
|
||||||
if (scrollLeft <= this.$padding)
|
if (scrollLeft <= this.$padding)
|
||||||
scrollLeft = 0;
|
scrollLeft = 0;
|
||||||
|
|
||||||
if (this.scrollLeft !== scrollLeft) {
|
if (this.scrollLeft !== scrollLeft)
|
||||||
this.$loop.schedule(this.CHANGE_H_SCROLL);
|
|
||||||
this.scrollLeft = scrollLeft;
|
this.scrollLeft = scrollLeft;
|
||||||
}
|
this.$loop.schedule(this.CHANGE_H_SCROLL);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.scrollBy = function(deltaX, deltaY) {
|
this.scrollBy = function(deltaX, deltaY) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
Ace
|
Ace
|
||||||
version 0.2.0
|
version 0.2.0
|
||||||
commit dd55f74256c7638f764dbc2e06ee690fc508ffc3
|
commit 67ba8f5f29ed1d0c3b3d31229d5597a99860f21c
|
||||||
|
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -11662,7 +11662,9 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.scrollLeft = 0;
|
this.scrollLeft = 0;
|
||||||
|
|
||||||
event.addListener(this.scroller, "scroll", function() {
|
event.addListener(this.scroller, "scroll", function() {
|
||||||
_self.session.setScrollLeft(_self.scroller.scrollLeft);
|
var scrollLeft = _self.scroller.scrollLeft;
|
||||||
|
_self.scrollLeft = scrollLeft;
|
||||||
|
_self.session.setScrollLeft(scrollLeft);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.cursorPos = {
|
this.cursorPos = {
|
||||||
|
|
@ -11961,7 +11963,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$renderChanges = function(changes) {
|
this.$renderChanges = function(changes) {
|
||||||
if (!changes || !this.session)
|
if (!changes || !this.session || !this.container.offsetWidth)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// text, scrolling and resize changes can cause the view port size to change
|
// text, scrolling and resize changes can cause the view port size to change
|
||||||
|
|
@ -11974,13 +11976,19 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$computeLayerConfig();
|
this.$computeLayerConfig();
|
||||||
|
|
||||||
// horizontal scrolling
|
// horizontal scrolling
|
||||||
if (changes & this.CHANGE_H_SCROLL)
|
if (changes & this.CHANGE_H_SCROLL) {
|
||||||
this.scroller.scrollLeft = this.scrollLeft
|
this.scroller.scrollLeft = this.scrollLeft;
|
||||||
|
|
||||||
|
// read the value after writing it since the value might get clipped
|
||||||
|
var scrollLeft = this.scroller.scrollLeft;
|
||||||
|
this.scrollLeft = scrollLeft;
|
||||||
|
this.session.setScrollLeft(scrollLeft);
|
||||||
|
}
|
||||||
|
|
||||||
// full
|
// full
|
||||||
if (changes & this.CHANGE_FULL) {
|
if (changes & this.CHANGE_FULL) {
|
||||||
this.$textLayer.checkForSizeChanges();
|
this.$textLayer.checkForSizeChanges();
|
||||||
// update scrollbar first to not loose scroll position when gutter calls resize
|
// update scrollbar first to not lose scroll position when gutter calls resize
|
||||||
this.$updateScrollBar();
|
this.$updateScrollBar();
|
||||||
this.$textLayer.update(this.layerConfig);
|
this.$textLayer.update(this.layerConfig);
|
||||||
if (this.showGutter)
|
if (this.showGutter)
|
||||||
|
|
@ -12262,10 +12270,9 @@ var VirtualRenderer = function(container, theme) {
|
||||||
if (scrollLeft <= this.$padding)
|
if (scrollLeft <= this.$padding)
|
||||||
scrollLeft = 0;
|
scrollLeft = 0;
|
||||||
|
|
||||||
if (this.scrollLeft !== scrollLeft) {
|
if (this.scrollLeft !== scrollLeft)
|
||||||
this.$loop.schedule(this.CHANGE_H_SCROLL);
|
|
||||||
this.scrollLeft = scrollLeft;
|
this.scrollLeft = scrollLeft;
|
||||||
}
|
this.$loop.schedule(this.CHANGE_H_SCROLL);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.scrollBy = function(deltaX, deltaY) {
|
this.scrollBy = function(deltaX, deltaY) {
|
||||||
|
|
|
||||||
|
|
@ -11662,7 +11662,9 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.scrollLeft = 0;
|
this.scrollLeft = 0;
|
||||||
|
|
||||||
event.addListener(this.scroller, "scroll", function() {
|
event.addListener(this.scroller, "scroll", function() {
|
||||||
_self.session.setScrollLeft(_self.scroller.scrollLeft);
|
var scrollLeft = _self.scroller.scrollLeft;
|
||||||
|
_self.scrollLeft = scrollLeft;
|
||||||
|
_self.session.setScrollLeft(scrollLeft);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.cursorPos = {
|
this.cursorPos = {
|
||||||
|
|
@ -11974,9 +11976,15 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$computeLayerConfig();
|
this.$computeLayerConfig();
|
||||||
|
|
||||||
// horizontal scrolling
|
// horizontal scrolling
|
||||||
if (changes & this.CHANGE_H_SCROLL)
|
if (changes & this.CHANGE_H_SCROLL) {
|
||||||
this.scroller.scrollLeft = this.scrollLeft
|
this.scroller.scrollLeft = this.scrollLeft;
|
||||||
|
|
||||||
|
// read the value after writing it since the value might get clipped
|
||||||
|
var scrollLeft = this.scroller.scrollLeft;
|
||||||
|
this.scrollLeft = scrollLeft;
|
||||||
|
this.session.setScrollLeft(scrollLeft);
|
||||||
|
}
|
||||||
|
|
||||||
// full
|
// full
|
||||||
if (changes & this.CHANGE_FULL) {
|
if (changes & this.CHANGE_FULL) {
|
||||||
this.$textLayer.checkForSizeChanges();
|
this.$textLayer.checkForSizeChanges();
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -12228,7 +12228,9 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.scrollLeft = 0;
|
this.scrollLeft = 0;
|
||||||
|
|
||||||
event.addListener(this.scroller, "scroll", function() {
|
event.addListener(this.scroller, "scroll", function() {
|
||||||
_self.session.setScrollLeft(_self.scroller.scrollLeft);
|
var scrollLeft = _self.scroller.scrollLeft;
|
||||||
|
_self.scrollLeft = scrollLeft;
|
||||||
|
_self.session.setScrollLeft(scrollLeft);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.cursorPos = {
|
this.cursorPos = {
|
||||||
|
|
@ -12527,7 +12529,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$renderChanges = function(changes) {
|
this.$renderChanges = function(changes) {
|
||||||
if (!changes || !this.session)
|
if (!changes || !this.session || !this.container.offsetWidth)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// text, scrolling and resize changes can cause the view port size to change
|
// text, scrolling and resize changes can cause the view port size to change
|
||||||
|
|
@ -12540,13 +12542,19 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$computeLayerConfig();
|
this.$computeLayerConfig();
|
||||||
|
|
||||||
// horizontal scrolling
|
// horizontal scrolling
|
||||||
if (changes & this.CHANGE_H_SCROLL)
|
if (changes & this.CHANGE_H_SCROLL) {
|
||||||
this.scroller.scrollLeft = this.scrollLeft
|
this.scroller.scrollLeft = this.scrollLeft;
|
||||||
|
|
||||||
|
// read the value after writing it since the value might get clipped
|
||||||
|
var scrollLeft = this.scroller.scrollLeft;
|
||||||
|
this.scrollLeft = scrollLeft;
|
||||||
|
this.session.setScrollLeft(scrollLeft);
|
||||||
|
}
|
||||||
|
|
||||||
// full
|
// full
|
||||||
if (changes & this.CHANGE_FULL) {
|
if (changes & this.CHANGE_FULL) {
|
||||||
this.$textLayer.checkForSizeChanges();
|
this.$textLayer.checkForSizeChanges();
|
||||||
// update scrollbar first to not loose scroll position when gutter calls resize
|
// update scrollbar first to not lose scroll position when gutter calls resize
|
||||||
this.$updateScrollBar();
|
this.$updateScrollBar();
|
||||||
this.$textLayer.update(this.layerConfig);
|
this.$textLayer.update(this.layerConfig);
|
||||||
if (this.showGutter)
|
if (this.showGutter)
|
||||||
|
|
@ -12828,10 +12836,9 @@ var VirtualRenderer = function(container, theme) {
|
||||||
if (scrollLeft <= this.$padding)
|
if (scrollLeft <= this.$padding)
|
||||||
scrollLeft = 0;
|
scrollLeft = 0;
|
||||||
|
|
||||||
if (this.scrollLeft !== scrollLeft) {
|
if (this.scrollLeft !== scrollLeft)
|
||||||
this.$loop.schedule(this.CHANGE_H_SCROLL);
|
|
||||||
this.scrollLeft = scrollLeft;
|
this.scrollLeft = scrollLeft;
|
||||||
}
|
this.$loop.schedule(this.CHANGE_H_SCROLL);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.scrollBy = function(deltaX, deltaY) {
|
this.scrollBy = function(deltaX, deltaY) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue