mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-12 03:10:03 +01:00
add loading spinner fallback (#202)
* add loading spinner fallback fixes #189 Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * handle testing with progress spinners Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * apply fixes and improvements Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * add example Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * bug fixes Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * resolves #189 Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * fix Signed-off-by: tech4GT <varun.gupta1798@gmail.com>
This commit is contained in:
committed by
Jeffrey Warren
parent
fba80bb151
commit
3b791ad58b
@@ -32,8 +32,14 @@ module.exports = function PixelManipulation(image, options) {
|
||||
// this could possibly be more efficient; see
|
||||
// https://github.com/p-v-o-s/infragram-js/blob/master/public/infragram.js#L173-L181
|
||||
|
||||
if(!options.inBrowser)
|
||||
var pace = require('pace')((pixels.shape[0] * pixels.shape[1]))
|
||||
if(!options.inBrowser){
|
||||
try{
|
||||
var pace = require('pace')((pixels.shape[0] * pixels.shape[1]));
|
||||
}
|
||||
catch(e){
|
||||
options.inBrowser = true;
|
||||
}
|
||||
}
|
||||
|
||||
for(var x = 0; x < pixels.shape[0]; x++) {
|
||||
for(var y = 0; y < pixels.shape[1]; y++) {
|
||||
|
||||
Reference in New Issue
Block a user