add basic test and remove some bugs (#271)

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>
This commit is contained in:
Varun Gupta
2018-05-29 06:24:23 +05:30
committed by Jeffrey Warren
parent 8d3ca0887f
commit be810fb9c4
5 changed files with 14 additions and 10 deletions

View File

@@ -47913,7 +47913,7 @@ function Run(ref, json_q, callback, progressObj) {
function drawStep(drawarray, pos) {
if (pos == drawarray.length && drawarray[pos - 1] !== undefined) {
var image = drawarray[pos - 1].image;
if (ref.objTypeOf(callback) == "Function") {
if (ref.objTypeOf(callback) == "Function" && ref.images[image].steps.slice(-1)[0].output) {
var steps = ref.images[image].steps;
var out = steps[steps.length - 1].output.src;
callback(out);
@@ -49668,9 +49668,6 @@ module.exports = function Invert(options, UI) {
// The function which is called on every draw.
function draw(input, callback, progressObj) {
console.log(this.getIndex());
console.log(this.getPreviousStep().options.name);
console.log(this.getStep(0).options.name);
progressObj.stop(true);
progressObj.overrideFlag = true;
// Tell UI that a step is being drawn.