bump to 2.1.0
This commit is contained in:
parent
81378359c9
commit
382d4f9781
2
dist/index.html
vendored
2
dist/index.html
vendored
File diff suppressed because one or more lines are too long
2
dist/resources/ws.min.js
vendored
2
dist/resources/ws.min.js
vendored
File diff suppressed because one or more lines are too long
66
dist/scripts/TimerWorker.js
vendored
66
dist/scripts/TimerWorker.js
vendored
|
@ -1,66 +0,0 @@
|
||||||
var _TimerInfos = [];
|
|
||||||
|
|
||||||
var TimerElasped = function (Id)
|
|
||||||
{
|
|
||||||
var TimerInfo = _TimerInfos[Id];
|
|
||||||
|
|
||||||
if (!TimerInfo)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.postMessage({
|
|
||||||
Action: "ELASPED",
|
|
||||||
Id: TimerInfo.Id,
|
|
||||||
RunOnce: TimerInfo.RunOnce,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
this.onmessage = function (e)
|
|
||||||
{
|
|
||||||
var Message = e.data;
|
|
||||||
|
|
||||||
switch (Message.Action)
|
|
||||||
{
|
|
||||||
case "START":
|
|
||||||
var TimerInfo = {
|
|
||||||
Id: Message.Id,
|
|
||||||
RunOnce: Message.RunOnce,
|
|
||||||
TimeOut: Message.TimeOut,
|
|
||||||
};
|
|
||||||
|
|
||||||
_TimerInfos[Message.Id] = TimerInfo;
|
|
||||||
|
|
||||||
if (Message.RunOnce == true)
|
|
||||||
{
|
|
||||||
TimerInfo.TimerId = setTimeout(TimerElasped, Message.TimeOut, Message.Id);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TimerInfo.TimerId = setInterval(TimerElasped, Message.TimeOut, Message.Id);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "STOP":
|
|
||||||
var TimerInfo = _TimerInfos[Message.Id];
|
|
||||||
|
|
||||||
if (!TimerInfo)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (TimerInfo.RunOnce == true)
|
|
||||||
{
|
|
||||||
clearTimeout(TimerInfo.TimerId);
|
|
||||||
delete _TimerInfos[Message.Id];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
clearInterval(TimerInfo.TimerId);
|
|
||||||
delete _TimerInfos[Message.Id];
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
2
dist/scripts/index.js
vendored
2
dist/scripts/index.js
vendored
|
@ -908,7 +908,7 @@ const btnGetGps_click = () => {
|
||||||
|
|
||||||
const ZipCode = data.address.Postal;
|
const ZipCode = data.address.Postal;
|
||||||
const City = data.address.City;
|
const City = data.address.City;
|
||||||
const State = states.getStateTwoDigitCode(data.address.Region);
|
const State = states.getTwoDigitCode(data.address.Region);
|
||||||
const Country = data.address.CountryCode;
|
const Country = data.address.CountryCode;
|
||||||
const TwcQuery = `${ZipCode}, ${City}, ${State}, ${Country}`;
|
const TwcQuery = `${ZipCode}, ${City}, ${State}, ${Country}`;
|
||||||
|
|
||||||
|
|
94
dist/scripts/timer.js
vendored
94
dist/scripts/timer.js
vendored
|
@ -1,94 +0,0 @@
|
||||||
if (window.Worker)
|
|
||||||
{
|
|
||||||
var _TimerWorkCallBacks = [];
|
|
||||||
var _TimerIds = 0;
|
|
||||||
|
|
||||||
var _TimerWorker = new window.Worker("scripts/TimerWorker.js");
|
|
||||||
_TimerWorker.onmessage = function (e)
|
|
||||||
{
|
|
||||||
var Message = e.data;
|
|
||||||
|
|
||||||
switch (Message.Action)
|
|
||||||
{
|
|
||||||
case "ELASPED":
|
|
||||||
var TimerWorkCallBack = _TimerWorkCallBacks[Message.Id];
|
|
||||||
|
|
||||||
if (!TimerWorkCallBack)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var Window = TimerWorkCallBack.Window;
|
|
||||||
var CallBack = TimerWorkCallBack.CallBack;
|
|
||||||
var Arguments = TimerWorkCallBack.Arguments;
|
|
||||||
|
|
||||||
if (typeof (CallBack) === 'string')
|
|
||||||
{
|
|
||||||
CallBack = new Function(CallBack);
|
|
||||||
}
|
|
||||||
if (typeof (CallBack) === 'function')
|
|
||||||
{
|
|
||||||
CallBack.apply(Window, Arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Message.RunOnce == true)
|
|
||||||
{
|
|
||||||
_clearIntervalWorker(Message.Id);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
window.setIntervalWorker = function (CallBack, TimeOut, Arguments)
|
|
||||||
{
|
|
||||||
Arguments = Array.prototype.slice.call(arguments).slice(2);
|
|
||||||
return _setIntervalWorker(false, CallBack, TimeOut, Arguments, window);
|
|
||||||
};
|
|
||||||
window.setTimeoutWorker = function (CallBack, TimeOut, Arguments)
|
|
||||||
{
|
|
||||||
Arguments = Array.prototype.slice.call(arguments).slice(2);
|
|
||||||
return _setIntervalWorker(true, CallBack, TimeOut, Arguments, window);
|
|
||||||
};
|
|
||||||
var _setIntervalWorker = function (RunOnce, CallBack, TimeOut, Arguments, Window)
|
|
||||||
{
|
|
||||||
var Id = ++_TimerIds;
|
|
||||||
|
|
||||||
_TimerWorkCallBacks[Id] = {
|
|
||||||
CallBack: CallBack,
|
|
||||||
Arguments: Arguments,
|
|
||||||
Window: Window,
|
|
||||||
};
|
|
||||||
|
|
||||||
_TimerWorker.postMessage({
|
|
||||||
Action: "START",
|
|
||||||
RunOnce: RunOnce,
|
|
||||||
Id: Id,
|
|
||||||
TimeOut: TimeOut,
|
|
||||||
});
|
|
||||||
|
|
||||||
return Id;
|
|
||||||
};
|
|
||||||
|
|
||||||
window.clearIntervalWorker = function (Id)
|
|
||||||
{
|
|
||||||
_clearIntervalWorker(Id);
|
|
||||||
};
|
|
||||||
window.clearTimeoutWorker = function (Id)
|
|
||||||
{
|
|
||||||
_clearIntervalWorker(Id);
|
|
||||||
};
|
|
||||||
var _clearIntervalWorker = function (Id)
|
|
||||||
{
|
|
||||||
if (!Id)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_TimerWorker.postMessage({
|
|
||||||
Action: "STOP",
|
|
||||||
Id: Id,
|
|
||||||
});
|
|
||||||
|
|
||||||
delete _TimerWorkCallBacks[Id];
|
|
||||||
};
|
|
||||||
}
|
|
2
dist/twc3.html
vendored
2
dist/twc3.html
vendored
|
@ -1 +1 @@
|
||||||
<!DOCTYPE html><html lang="en" xmlns="http://www.w3.org/1999/xhtml"><head><meta charset="utf-8"><link rel="stylesheet" type="text/css" href="resources/ws.min.css?_=2.0.0"><script type="text/javascript" src="resources/ws.min.js?_=2.0.0"></script></head><body><!-- This will force the browser to download the font before the canvas is rendered. --><div class="fontPreload" id="Star4000">123 This is a test</div><div class="fontPreload" id="Star4000Extended">123 This is a test</div><div class="fontPreload" id="Star4000LargeCompressedNumbers">123 This is a test</div><div class="fontPreload" id="Star4000LargeCompressed">123 This is a test</div><div class="fontPreload" id="Star4000Large">123 This is a test</div><div class="fontPreload" id="Star4000Small">123 This is a test</div><div class="fontPreload" id="Star4Radar">123 This is a test</div><div id="container"><canvas id="progressCanvas" width="640" height="480"></canvas></div></body></html>
|
<!DOCTYPE html><html lang="en" xmlns="http://www.w3.org/1999/xhtml"><head><meta charset="utf-8"><link rel="stylesheet" type="text/css" href="resources/ws.min.css?_=2.1.0"><script type="text/javascript" src="resources/ws.min.js?_=2.1.0"></script></head><body><!-- This will force the browser to download the font before the canvas is rendered. --><div class="fontPreload" id="Star4000">123 This is a test</div><div class="fontPreload" id="Star4000Extended">123 This is a test</div><div class="fontPreload" id="Star4000LargeCompressedNumbers">123 This is a test</div><div class="fontPreload" id="Star4000LargeCompressed">123 This is a test</div><div class="fontPreload" id="Star4000Large">123 This is a test</div><div class="fontPreload" id="Star4000Small">123 This is a test</div><div class="fontPreload" id="Star4Radar">123 This is a test</div><div id="container"><canvas id="progressCanvas" width="640" height="480"></canvas></div></body></html>
|
|
@ -1,4 +1,4 @@
|
||||||
const version = '2.0.0';
|
const version = '2.1.0';
|
||||||
|
|
||||||
const gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
const concat = require('gulp-concat');
|
const concat = require('gulp-concat');
|
||||||
|
@ -70,8 +70,6 @@ const other_files = [
|
||||||
'server/robots.txt',
|
'server/robots.txt',
|
||||||
'server/manifest.json',
|
'server/manifest.json',
|
||||||
'server/scripts/index.js',
|
'server/scripts/index.js',
|
||||||
'server/scripts/timer.js',
|
|
||||||
'server/scripts/TimerWorker.js',
|
|
||||||
'server/scripts/data/states.js',
|
'server/scripts/data/states.js',
|
||||||
'server/scripts/vendor/jquery-3.5.1.min.js',
|
'server/scripts/vendor/jquery-3.5.1.min.js',
|
||||||
'server/scripts/vendor/jquery.autocomplete.min.js',
|
'server/scripts/vendor/jquery.autocomplete.min.js',
|
||||||
|
|
Loading…
Reference in a new issue