mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-15 21:00:02 +01:00
Update README.md
This commit is contained in:
@@ -37,9 +37,11 @@ Note: Browser CORS Restrictions apply. Some browsers may not allow local images
|
|||||||
form other folders, and throw a Security Error instead.
|
form other folders, and throw a Security Error instead.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
sequencer.replaceImage(selector,steps);
|
sequencer.replaceImage(selector,steps,optional_options);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
`optional_options` allows to pass additional arguments to the module itself.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|||||||
7
dist/image-sequencer.js
vendored
7
dist/image-sequencer.js
vendored
@@ -34884,7 +34884,8 @@ ImageSequencer = function ImageSequencer(options) {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
function replaceImage(selector,steps) {
|
function replaceImage(selector,steps,options) {
|
||||||
|
options = options || {};
|
||||||
require('./ReplaceImage')(this,selector,steps);
|
require('./ReplaceImage')(this,selector,steps);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35001,7 +35002,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
},{"./modules/DoNothing":122,"./modules/DoNothingPix":123,"./modules/GreenChannel":124,"./modules/Invert":125,"./modules/NdviRed":126}],120:[function(require,module,exports){
|
},{"./modules/DoNothing":122,"./modules/DoNothingPix":123,"./modules/GreenChannel":124,"./modules/Invert":125,"./modules/NdviRed":126}],120:[function(require,module,exports){
|
||||||
function ReplaceImage(ref,selector,steps) {
|
function ReplaceImage(ref,selector,steps,options) {
|
||||||
if(!ref.options.inBrowser) return; // This isn't for Node.js
|
if(!ref.options.inBrowser) return; // This isn't for Node.js
|
||||||
this_ = ref;
|
this_ = ref;
|
||||||
var input = document.querySelectorAll(selector);
|
var input = document.querySelectorAll(selector);
|
||||||
@@ -35028,7 +35029,7 @@ function ReplaceImage(ref,selector,steps) {
|
|||||||
else make(url);
|
else make(url);
|
||||||
|
|
||||||
function make(url) {
|
function make(url) {
|
||||||
this_.loadImage(url).addSteps('default',steps).run(function(out){
|
this_.loadImage('default',url).addSteps('default',steps,options).run(function(out){
|
||||||
the_image.src = out;
|
the_image.src = out;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user