PDF Scroll: Find most visible part.
There was a bug in the function. Also, onLostFocus function's bug is solved. Signed-off-by: Gökay Şatır <gokay.satir@collabora.com> Change-Id: Ic793999c58e13c9a42d00a4c19e44285aad8c750
This commit is contained in:
parent
469b18877e
commit
34d5f4d519
2 changed files with 10 additions and 3 deletions
|
@ -5309,10 +5309,18 @@ L.CanvasTileLayer = L.Layer.extend({
|
|||
// Used with filebasedview.
|
||||
_getMostVisiblePart: function (queue) {
|
||||
var parts = [];
|
||||
var found = false;
|
||||
|
||||
for (var i = 0; i < queue.length; i++) {
|
||||
if (parts.indexOf(queue[i].part) < 0)
|
||||
for (var j = 0; j < parts.length; j++) {
|
||||
if (parts[j].part === queue[i].part) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
parts.push({part: queue[i].part, tileCount: 0});
|
||||
found = false;
|
||||
}
|
||||
|
||||
var maxTileCount = 0;
|
||||
|
@ -5439,7 +5447,6 @@ L.CanvasTileLayer = L.Layer.extend({
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
for (var i = 0; i < this._tiles.length; i++) {
|
||||
this._tiles[i].current = false; // Visible ones's "current" property will be set to true below.
|
||||
}
|
||||
|
|
|
@ -644,7 +644,7 @@ class Comment {
|
|||
if (this.sectionProperties.contentText.origText !== this.sectionProperties.nodeModifyText.value) {
|
||||
this.onSaveComment(e);
|
||||
}
|
||||
else if (this.sectionProperties.nodeModifyText.value === '') {
|
||||
else {
|
||||
this.onCancelClick(e);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue