zimjs 18.1.0 → 18.1.1
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 +23 -15
package/package.json
CHANGED
package/src/zim.js
CHANGED
|
@@ -2094,7 +2094,7 @@ pauseTimeLeft - if paused, get how much time is left once unpaused
|
|
|
2094
2094
|
if (zot(immediate)) immediate = false;
|
|
2095
2095
|
if (!zot(total) && (isNaN(total) || total<=0)) return;
|
|
2096
2096
|
if (zot(total)) total = -1;
|
|
2097
|
-
var obj = {count:0, total:total, paused:false, time:time, active:true, timeUnit:timeUnit};
|
|
2097
|
+
var obj = {count:(immediate && time <= (timeType=="s"?5/1000:5)) ? -1:0, total:total, paused:false, time:time, active:true, timeUnit:timeUnit};
|
|
2098
2098
|
|
|
2099
2099
|
if (pauseOnBlur) {
|
|
2100
2100
|
if (zot(zim.blurCheck)) zim.setBlurDetect();
|
|
@@ -2113,7 +2113,7 @@ pauseTimeLeft - if paused, get how much time is left once unpaused
|
|
|
2113
2113
|
checkTotal();
|
|
2114
2114
|
}, obj.interval*(timeType=="s"?1000:1));
|
|
2115
2115
|
}
|
|
2116
|
-
if (immediate) {
|
|
2116
|
+
if (immediate && time > (timeType=="s"?5/1000:5)) {
|
|
2117
2117
|
setTimeout(function() {
|
|
2118
2118
|
(call)(obj);
|
|
2119
2119
|
checkTotal();
|
|
@@ -24158,7 +24158,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
24158
24158
|
if (zot(rtl)) rtl = DS.rtl != null ? DS.rtl : false;
|
|
24159
24159
|
if (zot(lineAlign)) lineAlign = DS.lineAlign != null ? DS.lineAlign : rtl?"right":"left";
|
|
24160
24160
|
if (zot(lineValign)) lineValign = DS.lineValign != null ? DS.lineValign : "bottom";
|
|
24161
|
-
if (zot(lineWidth)) lineWidth = DS.lineWidth != null ? DS.lineWidth :
|
|
24161
|
+
if (zot(lineWidth)) lineWidth = DS.lineWidth != null ? DS.lineWidth : null;
|
|
24162
24162
|
if (zot(lineAlignLast)) lineAlignLast = DS.lineAlignLast != null ? DS.lineAlignLast : rtl?"right":"left";
|
|
24163
24163
|
if (zot(cache)) cache = DS.cache != null ? DS.cache : false;
|
|
24164
24164
|
|
|
@@ -25033,16 +25033,22 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
25033
25033
|
|
|
25034
25034
|
var originalLabel = !zot(label) && label.type == "Label";
|
|
25035
25035
|
if (zot(label)) label = DS.label != null ? DS.label : new zim.Label("Will this wind be so mighty as to lay low the mountains of the Earth?");
|
|
25036
|
-
|
|
25036
|
+
if (zot(size)) size = DS.size != null ? DS.size : originalLabel? label.size : 36;
|
|
25037
|
+
if (zot(spacingH)) spacingH = DS.spacingH != null ? DS.spacingH : size/2;
|
|
25038
|
+
if (zot(spacingV)) spacingV = DS.spacingV != null ? DS.spacingV : size/2;
|
|
25039
|
+
if (originalLabel) {
|
|
25040
|
+
var numWords = label.text.split(" ").length;
|
|
25041
|
+
var paddingT = label.background?label.paddingH*numWords*2:0;
|
|
25042
|
+
}
|
|
25043
|
+
if (zot(width)) width = DS.width != null ? DS.width : originalLabel ? label.width*(paddingT?1.05:1.07)+paddingT : 500;
|
|
25037
25044
|
if (zot(itemRegX)) itemRegX = DS.itemRegX != null ? DS.itemRegX : "center";
|
|
25038
25045
|
if (zot(itemRegY)) itemRegY = DS.itemRegY != null ? DS.itemRegY : "center";
|
|
25039
|
-
|
|
25046
|
+
|
|
25040
25047
|
if (zot(font)) font = DS.font != null ? DS.font : originalLabel? label.font : "arial";
|
|
25041
25048
|
if (zot(color)) color = DS.color != null ? DS.color : originalLabel? label.color : "black";
|
|
25042
25049
|
if (zot(backgroundColor)) backgroundColor = DS.backgroundColor != null ? DS.backgroundColor : originalLabel? label.backgroundColor : null;
|
|
25043
25050
|
if (zot(itemCache)) itemCache = DS.itemCache != null ? DS.itemCache : false;
|
|
25044
|
-
|
|
25045
|
-
if (zot(spacingV)) spacingV = DS.spacingV != null ? DS.spacingV : size/2;
|
|
25051
|
+
|
|
25046
25052
|
|
|
25047
25053
|
var that = this;
|
|
25048
25054
|
|
|
@@ -79944,6 +79950,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
79944
79950
|
tile.drag({boundary:tile, singleTouch:true});
|
|
79945
79951
|
}, timeType=="s"?(wait+time)*1000:wait+time);
|
|
79946
79952
|
}
|
|
79953
|
+
return that;
|
|
79947
79954
|
};
|
|
79948
79955
|
|
|
79949
79956
|
this._enabled = true;
|
|
@@ -87874,7 +87881,7 @@ zim.Frame = function(scaling, width, height, color, outerColor, ready, assets, p
|
|
|
87874
87881
|
var duo; if (duo = zob(that.loadAssets, arguments, sig)) return duo;
|
|
87875
87882
|
}
|
|
87876
87883
|
|
|
87877
|
-
if (!zot(path)) {
|
|
87884
|
+
if (!zot(path)) {s
|
|
87878
87885
|
path = path.replace(/\/$/,"");
|
|
87879
87886
|
path = path + "/";
|
|
87880
87887
|
WW.PATH = path;
|
|
@@ -88374,9 +88381,9 @@ zim.Frame = function(scaling, width, height, color, outerColor, ready, assets, p
|
|
|
88374
88381
|
|
|
88375
88382
|
if (WW.PATH!=null) zim.PATH = WW.PATH;
|
|
88376
88383
|
if (zim.PATH!=null) {
|
|
88377
|
-
zim.PATH.replace(/\/$/,"");
|
|
88384
|
+
zim.PATH = zim.PATH.replace(/\/$/,"");
|
|
88378
88385
|
zim.PATH = zim.PATH + "/";
|
|
88379
|
-
}
|
|
88386
|
+
}
|
|
88380
88387
|
if (second) {
|
|
88381
88388
|
var empty;
|
|
88382
88389
|
if (that.loadFailObj == "circles") empty = that.makeCircles(14);
|
|
@@ -90205,7 +90212,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
90205
90212
|
|
|
90206
90213
|
if (WW.PATH!=null) zim.PATH = WW.PATH;
|
|
90207
90214
|
if (zim.PATH!=null) {
|
|
90208
|
-
zim.PATH.replace(/\/$/,"");
|
|
90215
|
+
zim.PATH = zim.PATH.replace(/\/$/,"");
|
|
90209
90216
|
zim.PATH = zim.PATH + "/";
|
|
90210
90217
|
}
|
|
90211
90218
|
|
|
@@ -90445,8 +90452,8 @@ zim.Dat = function(file) {
|
|
|
90445
90452
|
} else {
|
|
90446
90453
|
if (WW.PATH!=null) zim.PATH = WW.PATH;
|
|
90447
90454
|
if (zim.PATH!=null) {
|
|
90448
|
-
zim.
|
|
90449
|
-
zim.
|
|
90455
|
+
zim.PATH = zim.PATH.replace(/\/$/,"");
|
|
90456
|
+
zim.PATH = zim.PATH + "/";
|
|
90450
90457
|
}
|
|
90451
90458
|
var loader = zdf.loadAssets(file, zim.PATH);
|
|
90452
90459
|
loader.on("complete", function() {
|
|
@@ -94018,8 +94025,8 @@ animator - the Gifler animator
|
|
|
94018
94025
|
var f;
|
|
94019
94026
|
if (WW.PATH!=null) zim.PATH = WW.PATH;
|
|
94020
94027
|
if (zim.PATH!=null) {
|
|
94021
|
-
zim.
|
|
94022
|
-
zim.
|
|
94028
|
+
zim.PATH = zim.PATH.replace(/\/$/,"");
|
|
94029
|
+
zim.PATH = zim.PATH + "/";
|
|
94023
94030
|
}
|
|
94024
94031
|
if (file.match(/http/) || file.match(/^\//)) f = file;
|
|
94025
94032
|
else f = (zim.PATH?zim.PATH:"")+file;
|
|
@@ -98312,3 +98319,4 @@ export let Style = zim.Style;
|
|
|
98312
98319
|
export let assets = zim.assets;
|
|
98313
98320
|
export let assetIDs = zim.assetIDs;
|
|
98314
98321
|
export let ZIMON = zim.ZIMON;
|
|
98322
|
+
|