Fossil SCM

Oops, fallen for testing built-in versus customized skin, fix the previous check-in.

florian 2019-01-02 07:24 js-hamburger-menu
Commit dac9293b527b284aec0dde0ec4620ae74e438513be54bb1c5240284716596bb5
1 file changed +10 -5
--- skins/default/js.txt
+++ skins/default/js.txt
@@ -39,15 +39,20 @@
3939
// is the whole point here.
4040
var animate = panel.style.transition !== null && (typeof(panel.style.transition) == "string");
4141
4242
// The duration of the animation can be overridden from the default skin
4343
// header.txt by setting the "data-anim-ms" attribute of the panel.
44
- var animMS = parseInt(panel.getAttribute("data-anim-ms"));
45
- if (isNaN(animMS) || animMs == 0)
46
- animate = false; // disable animation if non-numeric or zero
47
- else if (animMS < 0)
48
- animMS = 400; // set default animation duration if negative
44
+ var animMS = panel.getAttribute("data-anim-ms");
45
+ if (animMS) { // not null or empty string, parse it
46
+ animMS = parseInt(animMS);
47
+ if (isNaN(animMS) || animMS == 0)
48
+ animate = false; // disable animation if non-numeric or zero
49
+ else if (animMS < 0)
50
+ animMS = 400; // set default animation duration if negative
51
+ }
52
+ else // attribute is null or empty string, use default
53
+ animMS = 400;
4954
5055
// Calculate panel height despite its being hidden at call time.
5156
// Based on https://stackoverflow.com/a/29047447/142454
5257
var panelHeight; // computed on first panel display
5358
function calculatePanelHeight() {
5459
--- skins/default/js.txt
+++ skins/default/js.txt
@@ -39,15 +39,20 @@
39 // is the whole point here.
40 var animate = panel.style.transition !== null && (typeof(panel.style.transition) == "string");
41
42 // The duration of the animation can be overridden from the default skin
43 // header.txt by setting the "data-anim-ms" attribute of the panel.
44 var animMS = parseInt(panel.getAttribute("data-anim-ms"));
45 if (isNaN(animMS) || animMs == 0)
46 animate = false; // disable animation if non-numeric or zero
47 else if (animMS < 0)
48 animMS = 400; // set default animation duration if negative
 
 
 
 
 
49
50 // Calculate panel height despite its being hidden at call time.
51 // Based on https://stackoverflow.com/a/29047447/142454
52 var panelHeight; // computed on first panel display
53 function calculatePanelHeight() {
54
--- skins/default/js.txt
+++ skins/default/js.txt
@@ -39,15 +39,20 @@
39 // is the whole point here.
40 var animate = panel.style.transition !== null && (typeof(panel.style.transition) == "string");
41
42 // The duration of the animation can be overridden from the default skin
43 // header.txt by setting the "data-anim-ms" attribute of the panel.
44 var animMS = panel.getAttribute("data-anim-ms");
45 if (animMS) { // not null or empty string, parse it
46 animMS = parseInt(animMS);
47 if (isNaN(animMS) || animMS == 0)
48 animate = false; // disable animation if non-numeric or zero
49 else if (animMS < 0)
50 animMS = 400; // set default animation duration if negative
51 }
52 else // attribute is null or empty string, use default
53 animMS = 400;
54
55 // Calculate panel height despite its being hidden at call time.
56 // Based on https://stackoverflow.com/a/29047447/142454
57 var panelHeight; // computed on first panel display
58 function calculatePanelHeight() {
59

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button