@pageboard/html 0.10.22 → 0.10.23
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/elements/media.js +1 -1
- package/lib/nouislider.js +6 -20
- package/package.json +6 -7
- package/ui/card.css +0 -0
- package/ui/item.css +0 -0
- package/ui/rating.css +0 -0
package/elements/media.js
CHANGED
|
@@ -67,7 +67,7 @@ exports.video = {
|
|
|
67
67
|
},
|
|
68
68
|
html: `<video is="element-video" data-src="[url]" class="[display.fit|or:none]"
|
|
69
69
|
preload="metadata" autoplay="[autoplay]" loop="[loop]"
|
|
70
|
-
muted="[muted]" controls="[controls]"></video>`,
|
|
70
|
+
muted="[muted]" controls="[controls]" playsinline></video>`,
|
|
71
71
|
scripts: [
|
|
72
72
|
'../ui/media.js'
|
|
73
73
|
],
|
package/lib/nouislider.js
CHANGED
|
@@ -714,7 +714,6 @@
|
|
|
714
714
|
var hover = entry.indexOf("hover") >= 0;
|
|
715
715
|
var unconstrained = entry.indexOf("unconstrained") >= 0;
|
|
716
716
|
var dragAll = entry.indexOf("drag-all") >= 0;
|
|
717
|
-
var smoothSteps = entry.indexOf("smooth-steps") >= 0;
|
|
718
717
|
if (fixed) {
|
|
719
718
|
if (parsed.handles !== 2) {
|
|
720
719
|
throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");
|
|
@@ -729,7 +728,6 @@
|
|
|
729
728
|
tap: tap || snap,
|
|
730
729
|
drag: drag,
|
|
731
730
|
dragAll: dragAll,
|
|
732
|
-
smoothSteps: smoothSteps,
|
|
733
731
|
fixed: fixed,
|
|
734
732
|
snap: snap,
|
|
735
733
|
hover: hover,
|
|
@@ -1474,14 +1472,6 @@
|
|
|
1474
1472
|
scope_Body.removeEventListener("selectstart", preventDefault);
|
|
1475
1473
|
}
|
|
1476
1474
|
}
|
|
1477
|
-
if (options.events.smoothSteps) {
|
|
1478
|
-
data.handleNumbers.forEach(function (handleNumber) {
|
|
1479
|
-
setHandle(handleNumber, scope_Locations[handleNumber], true, true, false, false);
|
|
1480
|
-
});
|
|
1481
|
-
data.handleNumbers.forEach(function (handleNumber) {
|
|
1482
|
-
fireEvent("update", handleNumber);
|
|
1483
|
-
});
|
|
1484
|
-
}
|
|
1485
1475
|
data.handleNumbers.forEach(function (handleNumber) {
|
|
1486
1476
|
fireEvent("change", handleNumber);
|
|
1487
1477
|
fireEvent("set", handleNumber);
|
|
@@ -1781,7 +1771,7 @@
|
|
|
1781
1771
|
});
|
|
1782
1772
|
}
|
|
1783
1773
|
// Split out the handle positioning logic so the Move event can use it, too
|
|
1784
|
-
function checkHandlePosition(reference, handleNumber, to, lookBackward, lookForward, getValue
|
|
1774
|
+
function checkHandlePosition(reference, handleNumber, to, lookBackward, lookForward, getValue) {
|
|
1785
1775
|
var distance;
|
|
1786
1776
|
// For sliders with multiple handles, limit movement to the other handle.
|
|
1787
1777
|
// Apply the margin option by adding it to the handle positions.
|
|
@@ -1820,9 +1810,7 @@
|
|
|
1820
1810
|
to = Math.min(to, distance);
|
|
1821
1811
|
}
|
|
1822
1812
|
}
|
|
1823
|
-
|
|
1824
|
-
to = scope_Spectrum.getStep(to);
|
|
1825
|
-
}
|
|
1813
|
+
to = scope_Spectrum.getStep(to);
|
|
1826
1814
|
// Limit percentage to the 0 - 100 range
|
|
1827
1815
|
to = limit(to);
|
|
1828
1816
|
// Return false if handle can't move
|
|
@@ -1842,7 +1830,6 @@
|
|
|
1842
1830
|
var proposals = locations.slice();
|
|
1843
1831
|
// Store first handle now, so we still have it in case handleNumbers is reversed
|
|
1844
1832
|
var firstHandle = handleNumbers[0];
|
|
1845
|
-
var smoothSteps = options.events.smoothSteps;
|
|
1846
1833
|
var b = [!upward, upward];
|
|
1847
1834
|
var f = [upward, !upward];
|
|
1848
1835
|
// Copy handleNumbers so we don't change the dataset
|
|
@@ -1855,7 +1842,7 @@
|
|
|
1855
1842
|
// Step 1: get the maximum percentage that any of the handles can move
|
|
1856
1843
|
if (handleNumbers.length > 1) {
|
|
1857
1844
|
handleNumbers.forEach(function (handleNumber, o) {
|
|
1858
|
-
var to = checkHandlePosition(proposals, handleNumber, proposals[handleNumber] + proposal, b[o], f[o], false
|
|
1845
|
+
var to = checkHandlePosition(proposals, handleNumber, proposals[handleNumber] + proposal, b[o], f[o], false);
|
|
1859
1846
|
// Stop if one of the handles can't move.
|
|
1860
1847
|
if (to === false) {
|
|
1861
1848
|
proposal = 0;
|
|
@@ -1873,8 +1860,7 @@
|
|
|
1873
1860
|
var state = false;
|
|
1874
1861
|
// Step 2: Try to set the handles with the found percentage
|
|
1875
1862
|
handleNumbers.forEach(function (handleNumber, o) {
|
|
1876
|
-
state =
|
|
1877
|
-
setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o], false, smoothSteps) || state;
|
|
1863
|
+
state = setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o]) || state;
|
|
1878
1864
|
});
|
|
1879
1865
|
// Step 3: If a handle moved, fire events
|
|
1880
1866
|
if (state) {
|
|
@@ -1919,9 +1905,9 @@
|
|
|
1919
1905
|
}
|
|
1920
1906
|
// Test suggested values and apply margin, step.
|
|
1921
1907
|
// if exactInput is true, don't run checkHandlePosition, then the handle can be placed in between steps (#436)
|
|
1922
|
-
function setHandle(handleNumber, to, lookBackward, lookForward, exactInput
|
|
1908
|
+
function setHandle(handleNumber, to, lookBackward, lookForward, exactInput) {
|
|
1923
1909
|
if (!exactInput) {
|
|
1924
|
-
to = checkHandlePosition(scope_Locations, handleNumber, to, lookBackward, lookForward, false
|
|
1910
|
+
to = checkHandlePosition(scope_Locations, handleNumber, to, lookBackward, lookForward, false);
|
|
1925
1911
|
}
|
|
1926
1912
|
if (to === false) {
|
|
1927
1913
|
return false;
|
package/package.json
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pageboard/html",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.23",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
-
"postinstall": "postinstall",
|
|
9
|
-
"prepare": "postinstall"
|
|
10
|
-
},
|
|
11
6
|
"repository": {
|
|
12
7
|
"type": "git",
|
|
13
8
|
"url": "git+https://github.com/pageboard/client.git"
|
|
@@ -48,5 +43,9 @@
|
|
|
48
43
|
"elements": [
|
|
49
44
|
"elements/"
|
|
50
45
|
]
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
49
|
+
"postinstall": "postinstall"
|
|
51
50
|
}
|
|
52
|
-
}
|
|
51
|
+
}
|
package/ui/card.css
CHANGED
|
File without changes
|
package/ui/item.css
CHANGED
|
File without changes
|
package/ui/rating.css
CHANGED
|
File without changes
|