mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-15 04:40:02 +01:00
Restructure API (#824)
* Change addsteps(), loadImages(), run() and default UI * Restructure API completely * Add updated dist files * Removed extra comments * Indentation improved * Update README.md
This commit is contained in:
committed by
Jeffrey Warren
parent
3d1bbe5940
commit
2f21bec80a
@@ -8,14 +8,14 @@ require('../../../src/ImageSequencer.js');
|
||||
var sequencer = ImageSequencer({ ui: false });
|
||||
var red = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAAQABADASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAf/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFQEBAQAAAAAAAAAAAAAAAAAABgj/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwCdABykX//Z";
|
||||
|
||||
if(typeof(document) !== "undefined") {
|
||||
if(typeof(window) !== "undefined") {
|
||||
var image = document.createElement("img");
|
||||
image.src = red;
|
||||
document.body.appendChild(image);
|
||||
}
|
||||
|
||||
test('replaceImage works.', function (t){
|
||||
if (typeof(document) === "undefined")
|
||||
if (typeof(window) === "undefined")
|
||||
t.end();
|
||||
|
||||
sequencer.replaceImage("img","invert",{ callback: function(){
|
||||
|
||||
Reference in New Issue
Block a user