From 9936f1effdf8912dcf522aafba5617d7c30bc971 Mon Sep 17 00:00:00 2001 From: Doug Bird Date: Thu, 15 Feb 2018 03:14:09 -0800 Subject: [PATCH] new method interface --- demo.html | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/demo.html b/demo.html index f714774..28292fa 100644 --- a/demo.html +++ b/demo.html @@ -61,7 +61,7 @@

Configurable time example

Overlapping / Race example #1

- +

Invokes "activate()" function 2 times successively, tracking each "spinHandle" respectively.

@@ -81,7 +81,7 @@

Overlapping / Race example #1

Overlapping / Race example #2

- +

Invokes "activate()" function 2 times successively, tracking each "spinHandle" respectively.

@@ -137,9 +137,9 @@

Overlapping / Race example #2

(function() { var show3SecondsBtn = document.getElementById('show-3-seconds-btn'); show3SecondsBtn.onclick = function() { - var spinHandle = loadingOverlay().activate(); + var spinHandle = loadingOverlay.activate(); setTimeout(function() { - loadingOverlay().cancel(spinHandle); + loadingOverlay.cancel(spinHandle); }, 3000); return false; }; @@ -151,9 +151,9 @@

Overlapping / Race example #2

var showNSecondsForm = document.getElementById('show-n-seconds-form'); showNSecondsForm.onsubmit = function() { var msTimeout = parseInt(document.getElementById('show-n-seconds-number').value) * 1000; - var spinHandle = loadingOverlay().activate(); + var spinHandle = loadingOverlay.activate(); setTimeout(function() { - loadingOverlay().cancel(spinHandle); + loadingOverlay.cancel(spinHandle); }, msTimeout); return false; }; @@ -164,13 +164,13 @@

Overlapping / Race example #2

(function() { var race1Btn = document.getElementById('race-1-btn'); race1Btn.onclick = function() { - var spinHandle1 = loadingOverlay().activate(); - var spinHandle2 = loadingOverlay().activate(); + var spinHandle1 = loadingOverlay.activate(); + var spinHandle2 = loadingOverlay.activate(); setTimeout(function() { - loadingOverlay().cancel(spinHandle1); + loadingOverlay.cancel(spinHandle1); }, 3000); setTimeout(function() { - loadingOverlay().cancel(spinHandle2); + loadingOverlay.cancel(spinHandle2); }, 5000); document.getElementById('race-1-spin-handle-1').value = spinHandle1; document.getElementById('race-1-spin-handle-2').value = spinHandle2; @@ -183,13 +183,13 @@

Overlapping / Race example #2

(function() { var race2Btn = document.getElementById('race-2-btn'); race2Btn.onclick = function() { - var spinHandle1 = loadingOverlay().activate(); - var spinHandle2 = loadingOverlay().activate(); + var spinHandle1 = loadingOverlay.activate(); + var spinHandle2 = loadingOverlay.activate(); setTimeout(function() { - loadingOverlay().cancel(spinHandle1); + loadingOverlay.cancel(spinHandle1); }, 5000); setTimeout(function() { - loadingOverlay().cancel(spinHandle2); + loadingOverlay.cancel(spinHandle2); }, 3000); document.getElementById('race-2-spin-handle-1').value = spinHandle1; document.getElementById('race-2-spin-handle-2').value = spinHandle2; @@ -199,4 +199,4 @@

Overlapping / Race example #2

- \ No newline at end of file +