zimjs 18.2.5 → 18.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/zim.js +20 -15
package/package.json
CHANGED
package/src/zim.js
CHANGED
|
@@ -29252,8 +29252,10 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
29252
29252
|
hitArea.y = -content.y;
|
|
29253
29253
|
}
|
|
29254
29254
|
content.x = hscrollBar.proportion.convert(hscrollBar.x);
|
|
29255
|
-
if (!damp)
|
|
29256
|
-
|
|
29255
|
+
if (!damp) {
|
|
29256
|
+
desiredX = that.scrollX;
|
|
29257
|
+
testContent();
|
|
29258
|
+
}
|
|
29257
29259
|
});
|
|
29258
29260
|
}
|
|
29259
29261
|
}
|
|
@@ -29284,12 +29286,14 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
29284
29286
|
hitArea.x = -content.x;
|
|
29285
29287
|
hitArea.y = -content.y;
|
|
29286
29288
|
}
|
|
29287
|
-
if (damp)
|
|
29288
|
-
|
|
29289
|
+
if (damp) {
|
|
29290
|
+
desiredY = vscrollBar.proportion.convert(vscrollBar.y);
|
|
29291
|
+
testContent();
|
|
29292
|
+
} else {
|
|
29289
29293
|
content.y = vscrollBar.proportion.convert(vscrollBar.y);
|
|
29290
29294
|
desiredY = that.scrollY;
|
|
29291
29295
|
}
|
|
29292
|
-
|
|
29296
|
+
|
|
29293
29297
|
});
|
|
29294
29298
|
}
|
|
29295
29299
|
}
|
|
@@ -29313,7 +29317,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
29313
29317
|
clearTimeout(that.dTimeout);
|
|
29314
29318
|
that.dTimeout = setTimeout(function(){setdragBoundary();}, 300);
|
|
29315
29319
|
setdragBoundary();
|
|
29316
|
-
testContent();
|
|
29320
|
+
if (!damp) testContent();
|
|
29317
29321
|
};
|
|
29318
29322
|
|
|
29319
29323
|
this.doResize = function(w, h) {
|
|
@@ -29683,7 +29687,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
29683
29687
|
}
|
|
29684
29688
|
|
|
29685
29689
|
function testContent() {
|
|
29686
|
-
if (!that.optimize) return;
|
|
29690
|
+
if (!that.optimize) return;
|
|
29687
29691
|
stage = that.stage;
|
|
29688
29692
|
content.loop(function(item) {
|
|
29689
29693
|
// ADJUSTED ZIM 016 - look into how we can optimize a wrapper and keep scrollbars the right size
|
|
@@ -29699,8 +29703,8 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
29699
29703
|
});
|
|
29700
29704
|
}
|
|
29701
29705
|
|
|
29702
|
-
function movescrollBars() {
|
|
29703
|
-
testContent();
|
|
29706
|
+
function movescrollBars(noTest) {
|
|
29707
|
+
if (!noTest) testContent();
|
|
29704
29708
|
that.dispatchEvent("scrolling");
|
|
29705
29709
|
if (hitArea) {
|
|
29706
29710
|
// move hitarea to display box
|
|
@@ -29921,7 +29925,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
29921
29925
|
}
|
|
29922
29926
|
}
|
|
29923
29927
|
}
|
|
29924
|
-
if (optimize) {
|
|
29928
|
+
if (optimize && !damp) {
|
|
29925
29929
|
testContent();
|
|
29926
29930
|
}
|
|
29927
29931
|
}
|
|
@@ -29931,13 +29935,14 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
29931
29935
|
WW.addEventListener("DOMMouseScroll", that.scrollWindow);
|
|
29932
29936
|
}
|
|
29933
29937
|
var dampCheck = false;
|
|
29934
|
-
var dampY;
|
|
29938
|
+
var dampY;
|
|
29939
|
+
if (damp) {scrollBarDown = true; desiredY = .01;} // Patched ZIM 018
|
|
29935
29940
|
function makeDamp(obj) {
|
|
29936
29941
|
if (damp && !dampCheck && obj.stage) {
|
|
29937
29942
|
dampCheck = true;
|
|
29938
29943
|
dampY = new zim.Damp(that.scrollY, damp);
|
|
29939
29944
|
that.dampTicker = zim.Ticker.add(function() {
|
|
29940
|
-
if (swipeCheck) return;
|
|
29945
|
+
if (swipeCheck) return;
|
|
29941
29946
|
if ( // need to kickstart damping but still stop updating when damping ends
|
|
29942
29947
|
that.scrollY!=null && desiredY!=null
|
|
29943
29948
|
&& that.scrollY != desiredY // let the damping start
|
|
@@ -29946,10 +29951,9 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
29946
29951
|
scrollBarDown = false;
|
|
29947
29952
|
return;
|
|
29948
29953
|
}
|
|
29949
|
-
// if (!zot(desiredY)) that.scrollY = dampY.convert(desiredY);
|
|
29950
29954
|
if (!zot(desiredY)) content.y = dampY.convert(desiredY);
|
|
29951
|
-
if (!scrollBarDown) movescrollBars();
|
|
29952
|
-
|
|
29955
|
+
if (!scrollBarDown) movescrollBars(true);
|
|
29956
|
+
testContent();
|
|
29953
29957
|
}, obj.stage);
|
|
29954
29958
|
}
|
|
29955
29959
|
}
|
|
@@ -29968,6 +29972,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
29968
29972
|
clearTimeout(that.dTimeout);
|
|
29969
29973
|
zim.noDrag(content);
|
|
29970
29974
|
} else {
|
|
29975
|
+
swipeCheck = false;
|
|
29971
29976
|
setDrag();
|
|
29972
29977
|
}
|
|
29973
29978
|
if (that.blinker) {
|