fix click offset bug
This commit is contained in:
parent
67ba8f5f29
commit
2814203c33
1 changed files with 11 additions and 3 deletions
|
|
@ -110,7 +110,9 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.scrollLeft = 0;
|
||||
|
||||
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 = {
|
||||
|
|
@ -422,9 +424,15 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.$computeLayerConfig();
|
||||
|
||||
// horizontal scrolling
|
||||
if (changes & this.CHANGE_H_SCROLL)
|
||||
if (changes & this.CHANGE_H_SCROLL) {
|
||||
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
|
||||
if (changes & this.CHANGE_FULL) {
|
||||
this.$textLayer.checkForSizeChanges();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue