Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren committed Feb 12, 2019
1 parent a7ffae9 commit 02ffd9f
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 18 deletions.
71 changes: 54 additions & 17 deletions dist/image-sequencer.js
Original file line number Diff line number Diff line change
Expand Up @@ -65962,6 +65962,12 @@ module.exports = function Dynamic(options, UI, util) {
// save first image's pixels
var priorStep = this.getStep(options.offset);

if (priorStep.output === undefined) {
this.output = input;
UI.notify('Offset Unavailable','offset-notification');
callback();
}

getPixels(priorStep.output.src, function(err, pixels) {
options.firstImagePixels = pixels;

Expand Down Expand Up @@ -66328,24 +66334,50 @@ module.exports={
}

},{}],177:[function(require,module,exports){
module.exports = function NdviColormapfunction(options, UI) {
module.exports = function Colorbar(options, UI) {

var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
var output;

options.x = options.x || defaults.x;
options.y = options.y || defaults.y;
options.colormap = options.colormap || defaults.colormap;
options.h = options.h || defaults.h;
this.expandSteps([
{ 'name': 'gradient', 'options': {} },
{ 'name': 'colormap', 'options': { colormap: options.colormap } },
{ 'name': 'crop', 'options': { 'y': 0, 'h': options.h } },
{ 'name': 'overlay', 'options': { 'x': options.x, 'y': options.y, 'offset': -4 } }
]);
return {
isMeta: true
}
options.x = options.x || defaults.x;
options.y = options.y || defaults.y;
options.colormap = options.colormap || defaults.colormap;
options.h = options.h || defaults.h;

console.log('added colorbar 13');
var steps = [
{ 'name': 'gradient', 'options': {} },
{ 'name': 'colormap', 'options': { colormap: options.colormap } },
{ 'name': 'crop', 'options': { 'y': 0, 'h': options.h } },
{ 'name': 'overlay', 'options': { 'x': options.x, 'y': options.y, 'offset': -4 } }
];

var internalSequencer = ImageSequencer();
console.log('colorbar setup is', internalSequencer);

function draw(input,callback) {

var step = this;
console.log('colorbar draw', input);

internalSequencer.addImage(input.src, function onAddImage() {
internalSequencer.importJSON(steps);
internalSequencer.run(function onCallback(internalOutput) {
step.output = { src: internalOutput, format: input.format };
callback();
});
});

}

return {
options: options,
draw: draw,
output: output,
UI: UI
}
}

},{"./../../util/getDefaults.js":270,"./info.json":179}],178:[function(require,module,exports){
arguments[4][162][0].apply(exports,arguments)
},{"./Module":177,"./info.json":179,"dup":162}],179:[function(require,module,exports){
Expand Down Expand Up @@ -67242,7 +67274,7 @@ module.exports = function DoNothing(options,UI) {
}
}

},{"../_nomodule/PixelManipulation.js":253,"get-pixels":29,"jsqr":74}],198:[function(require,module,exports){
},{"../_nomodule/PixelManipulation.js":264,"get-pixels":29,"jsqr":74}],198:[function(require,module,exports){
arguments[4][162][0].apply(exports,arguments)
},{"./Module":197,"./info.json":199,"dup":162}],199:[function(require,module,exports){
module.exports={
Expand Down Expand Up @@ -68991,14 +69023,15 @@ module.exports={
"rotate": {
"type": "range",
"desc": "Angular value for rotation in degrees",
"default": "0",
"default": "90",
"min": "0",
"max": "360",
"step": "1"
}
},
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md"
}

},{}],251:[function(require,module,exports){
/*
* Saturate an image with a value from 0 to 1
Expand Down Expand Up @@ -69757,6 +69790,10 @@ module.exports = function UserInterface(events = {}) {
}
}

events.notify = events.notify || function(msg) {
console.log(msg);
}

return events;

}
Expand Down
2 changes: 1 addition & 1 deletion dist/image-sequencer.min.js

Large diffs are not rendered by default.

0 comments on commit 02ffd9f

Please sign in to comment.