mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-14 12:19:58 +01:00
revert
This commit is contained in:
@@ -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`.
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user