From b0a21ffd3e302e59a8623718c1cbbe96e408e01f Mon Sep 17 00:00:00 2001 From: Chinmay Pandhare Date: Fri, 7 Jul 2017 02:17:11 +0530 Subject: [PATCH] revert --- README.md | 7 ------- src/ImageSequencer.js | 7 ------- test/image-sequencer.js | 13 ------------- 3 files changed, 27 deletions(-) diff --git a/README.md b/README.md index ca289317..2a1e3897 100644 --- a/README.md +++ b/README.md @@ -138,13 +138,6 @@ sequencer.insertSteps({ }); ``` -### Replacing an Image -An existing image can be replaced with another image, retaining the steps of the initial image. This has a very straightforward syntax. -```js -sequencer.replaceImage('image_name',image_src); -``` - - ## Contributing Happily accepting pull requests; to edit the core library, modify files in `/src/`. To build, run `npm install` and `grunt build`. diff --git a/src/ImageSequencer.js b/src/ImageSequencer.js index 354dc798..79c1b347 100644 --- a/src/ImageSequencer.js +++ b/src/ImageSequencer.js @@ -125,13 +125,6 @@ ImageSequencer = function ImageSequencer(options) { json_q.callback(); } - function replaceImage(image,src) { - this_ = this; - this_.images[image].steps[0].draw(src,function(){ - this_.run(); - }); - } - return { options: options, loadImages: loadImages, diff --git a/test/image-sequencer.js b/test/image-sequencer.js index d2f0c69d..83f06fcc 100644 --- a/test/image-sequencer.js +++ b/test/image-sequencer.js @@ -108,16 +108,3 @@ test('run() runs the sequencer', function (t) { t.equal(typeof(sequencer.images.test.steps[sequencer.images.test.steps.length - 1].output), "object", "It Does!"); t.end(); }); - -test('replaceImage() replaces the image and runs the sequencer', function (t) { - var testarray = []; - for (i in sequencer.images.test.steps) { - testarray.push(sequencer.images.test.steps[i].output.src); - } - t.equal(true,true); - sequencer.replaceImage('test','examples/cyan.jpg'); - for (i in testarray) { - t.notEqual(testarray[i],sequencer.images.test.steps[i].output.src); - } - t.end(); -});