amos-tool 1.6.5 → 1.6.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/docs/Logger.html +1 -1
- package/docs/global.html +14 -2
- package/docs/index.html +1 -1
- package/lib/completeUnit.js +17 -13
- package/package.json +1 -1
package/docs/Logger.html
CHANGED
|
@@ -490,7 +490,7 @@ isDebug: true
|
|
|
490
490
|
<br class="clear">
|
|
491
491
|
|
|
492
492
|
<footer>
|
|
493
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Fri Nov 24 2023 15:
|
|
493
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Fri Nov 24 2023 15:32:04 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
494
494
|
</footer>
|
|
495
495
|
|
|
496
496
|
<script>prettyPrint();</script>
|
package/docs/global.html
CHANGED
|
@@ -15745,7 +15745,7 @@ schedule <code>callback</code> to execute after <code>delay</code> ms.</p></td>
|
|
|
15745
15745
|
|
|
15746
15746
|
|
|
15747
15747
|
|
|
15748
|
-
<h4 class="name" id="toRealSize"><span class="type-signature"></span>toRealSize<span class="signature">(val, type, parentWH)</span><span class="type-signature"
|
|
15748
|
+
<h4 class="name" id="toRealSize"><span class="type-signature"></span>toRealSize<span class="signature">(val, type, parentWH)</span><span class="type-signature"> → {Number}</span></h4>
|
|
15749
15749
|
|
|
15750
15750
|
|
|
15751
15751
|
|
|
@@ -15919,6 +15919,18 @@ schedule <code>callback</code> to execute after <code>delay</code> ms.</p></td>
|
|
|
15919
15919
|
|
|
15920
15920
|
|
|
15921
15921
|
|
|
15922
|
+
<dl class="param-type">
|
|
15923
|
+
<dt>
|
|
15924
|
+
Type
|
|
15925
|
+
</dt>
|
|
15926
|
+
<dd>
|
|
15927
|
+
|
|
15928
|
+
<span class="param-type">Number</span>
|
|
15929
|
+
|
|
15930
|
+
|
|
15931
|
+
</dd>
|
|
15932
|
+
</dl>
|
|
15933
|
+
|
|
15922
15934
|
|
|
15923
15935
|
|
|
15924
15936
|
|
|
@@ -16790,7 +16802,7 @@ schedule <code>callback</code> to execute after <code>delay</code> ms.</p></td>
|
|
|
16790
16802
|
<br class="clear">
|
|
16791
16803
|
|
|
16792
16804
|
<footer>
|
|
16793
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Fri Nov 24 2023 15:
|
|
16805
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Fri Nov 24 2023 15:32:04 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
16794
16806
|
</footer>
|
|
16795
16807
|
|
|
16796
16808
|
<script>prettyPrint();</script>
|
package/docs/index.html
CHANGED
|
@@ -793,7 +793,7 @@ convert2BMP(canvas, width, height)</p>
|
|
|
793
793
|
<br class="clear">
|
|
794
794
|
|
|
795
795
|
<footer>
|
|
796
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Fri Nov 24 2023 15:
|
|
796
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Fri Nov 24 2023 15:32:04 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
797
797
|
</footer>
|
|
798
798
|
|
|
799
799
|
<script>prettyPrint();</script>
|
package/lib/completeUnit.js
CHANGED
|
@@ -15,20 +15,24 @@ function toPixel(e) {
|
|
|
15
15
|
var _100 = 100;
|
|
16
16
|
|
|
17
17
|
function toRealSize(e, t, i) {
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
if (!e) return e;
|
|
19
|
+
if (utils.isNumber(e)) return Number(e);
|
|
20
|
+
if (utils.isString(e)) {
|
|
21
|
+
if (-1 !== e.indexOf("%")) {
|
|
22
|
+
var r = parseFloat(e) / _100, n = "width" === t ? r * (i || window.innerWidth) : r * (i || window.innerHeight);
|
|
23
|
+
return Math.floor(n);
|
|
24
|
+
}
|
|
25
|
+
if (-1 !== e.indexOf("vw")) {
|
|
26
|
+
var o = parseFloat(e) / _100 * window.innerWidth;
|
|
27
|
+
return Math.floor(o);
|
|
28
|
+
}
|
|
29
|
+
if (-1 !== e.indexOf("vh")) {
|
|
30
|
+
var l = parseFloat(e) / _100 * window.innerHeight;
|
|
31
|
+
return Math.floor(l);
|
|
32
|
+
}
|
|
21
33
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return Math.floor(o);
|
|
25
|
-
}
|
|
26
|
-
if (-1 !== e.indexOf("vh")) {
|
|
27
|
-
var l = parseFloat(e) / _100 * window.innerHeight;
|
|
28
|
-
return Math.floor(l);
|
|
29
|
-
}
|
|
30
|
-
var a = parseFloat(e);
|
|
31
|
-
return isNaN(a) ? 0 : a;
|
|
34
|
+
var u = parseFloat(e);
|
|
35
|
+
return isNaN(u) ? 0 : u;
|
|
32
36
|
}
|
|
33
37
|
|
|
34
38
|
module.exports = completeUnit, module.exports.toPixel = toPixel, module.exports.toRealSize = toRealSize;
|