Releases: katmore/gpu-loading-overlay
more fixes
fixes
method interface, cancel all spinners, graceful DOM removal
method interface, cancel all spinners, graceful DOM removal
- new loadingOverlay method interface
- cancel all active spinners method
- graceful DOM removal fix
new loadingOverlay method interface
Previously, all methods had to be called by awkwardly invoking loadingOverlay()
as a function and then chaining the method.
The need for this is now eliminated; all methods may now be directly invoked from the loadingOverlay
object.
-
Example #1: the new way to invoke methods
Invoke
.activate()
and.cancel()
methods directly.var mySpinner = loadingOverlay.activate(); setTimeout(function() { loadingOverlay.cancel(mySpinner); },5000);
For backwards compatibility, the old way to invoke methods via chaining still works.
cancel all active spinners method
The .cancelAll()
method will cancel any and all active spinners.
**Example #2: ** natively cancel any active spinners
loadingOverlay.cancelAll();
graceful DOM removal fix
Inconsistent and undesired behavior could occur when the loading overlay wrap container was removed from DOM.
A fix was applied to resolve this circumstance by appending the wrap any time it is missing when the activate()
function is called. The activation status of any un-cancelled spinners is also reset.
**Example #3: ** effectively cancel any active spinners via DOM manipulation
var loWrapElem = document.querySelectorAll('.lo-wrap');
for (var i = 0; i < loWrapElem .length; i++) {
loWrapElem [i].remove();
}
css fixes
lo-wrap modal fix css fixes
overlay container fixes
Fixed an issue where the loading overlay container does not properly append to the 'body' (or specified target).
remove external dependencies
-
Removed all jQuery dependencies:
Previously, the code had relied on$().show()
,$().hide()
,$().append()
,$().hasClass()
, etc.
This functionality has been replaced with equivalent routines implemented using 100% vanilla JavaScript. -
Removed FontAwesome from demo
FontAwesome had been used for a little clock-icon feature, this has been replaced with an inline SVG
race condition fixes
fix for overlapping invokations of .activate()
removed minified files
Minification with either uglifyjs or minify causes loadingOverlay to break.
more readme updates
Fixed some bad URL links, etc.
updated readme
Updated the README.md with installation instructions, and usage details.