Minimize mod req (#289)

* remove trailing spaces from Run.js

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* minimize module requirements demonstrated with invert fixes #122

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* refactored modules

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* update docs

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* remove all trailing spaces from all files

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* fixing crop module

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* fix

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* update contributing.md

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>
This commit is contained in:
Varun Gupta
2018-06-16 01:14:18 +05:30
committed by Jeffrey Warren
parent 5132612dc2
commit 8d6b82d988
27 changed files with 264 additions and 567 deletions

View File

@@ -8,14 +8,12 @@
*/
module.exports = function ImportImageModule(options, UI) {
options = options || {};
options.imageUrl = options.url || "./images/monarch.png";
var output,
imgObj = new Image();
// Tell the UI that a step has been added
UI.onSetup(options.step); // we should get UI to return the image thumbnail so we can attach our own UI extensions
// we should get UI to return the image thumbnail so we can attach our own UI extensions
// add our custom in-module html ui:
if (options.step.inBrowser) {
@@ -26,8 +24,6 @@ module.exports = function ImportImageModule(options, UI) {
// This function is caled everytime the step has to be redrawn
function draw(input,callback) {
// Tell the UI that the step has been triggered
UI.onDraw(options.step);
var step = this;
step.metadata = step.metadata || {};
@@ -43,12 +39,6 @@ module.exports = function ImportImageModule(options, UI) {
format: options.format
}
// This output is accessible to the UI
options.step.output = imgObj.src;
// Tell the UI that the step has been drawn
UI.onComplete(options.step);
// Tell Image Sequencer that step has been drawn
callback();
}