mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-13 11:50:02 +01:00
Eslint operator spacing config (#1109)
* Eslint operator spacing config * consistent spacing after comma * comma styling config * Trailing spaces config
This commit is contained in:
@@ -1,31 +1,31 @@
|
||||
/*
|
||||
* Decodes QR from a given image.
|
||||
*/
|
||||
module.exports = function DoNothing(options,UI) {
|
||||
module.exports = function DoNothing(options, UI) {
|
||||
|
||||
var output;
|
||||
var jsQR = require('jsqr');
|
||||
var getPixels = require('get-pixels');
|
||||
|
||||
// This function is called everytime a step has to be redrawn
|
||||
function draw(input,callback,progressObj) {
|
||||
function draw(input, callback, progressObj) {
|
||||
|
||||
progressObj.stop(true);
|
||||
progressObj.overrideFlag = true;
|
||||
|
||||
var step = this;
|
||||
|
||||
getPixels(input.src,function(err,pixels){
|
||||
getPixels(input.src, function(err, pixels){
|
||||
|
||||
if(err) throw err;
|
||||
|
||||
var w = pixels.shape[0];
|
||||
var h = pixels.shape[1];
|
||||
var decoded = jsQR(pixels.data,w,h);
|
||||
var decoded = jsQR(pixels.data, w, h);
|
||||
|
||||
|
||||
// Tell Image Sequencer that this step is complete
|
||||
options.step.qrval = (decoded)?decoded.data:'undefined';
|
||||
options.step.qrval = (decoded) ? decoded.data : 'undefined';
|
||||
});
|
||||
|
||||
function output(image, datauri, mimetype){
|
||||
|
||||
Reference in New Issue
Block a user