mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-15 04:40:02 +01:00
Automatic Image Naming
This commit is contained in:
@@ -159,6 +159,8 @@ Methods can be chained on the Image Sequencer:
|
|||||||
* run() can not be in the middle of the chain.
|
* run() can not be in the middle of the chain.
|
||||||
* If the chain starts with loadImage() or loadImages(), the following methods are
|
* If the chain starts with loadImage() or loadImages(), the following methods are
|
||||||
applied only to the newly loaded images.
|
applied only to the newly loaded images.
|
||||||
|
* If no name is provided to the image, a name will be generated for it. The name will
|
||||||
|
be of the form "image<number>". For ex: "image1", "image2", "image3", etc.
|
||||||
|
|
||||||
Valid Chains:
|
Valid Chains:
|
||||||
```js
|
```js
|
||||||
|
|||||||
8
dist/image-sequencer.js
vendored
8
dist/image-sequencer.js
vendored
@@ -34684,8 +34684,12 @@ function formatInput(args,format,images) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (format[0] == "o_string" && format_i == "l" && args.length == 2) {
|
else if (format[0] == "o_string" && format_i == "l" && args.length == 2) {
|
||||||
if (typeof(args[0]) == "string")
|
if (typeof(args[0]) == "string") {
|
||||||
args.splice(0,0,"default");
|
identifier = "image";
|
||||||
|
number = 1;
|
||||||
|
while (this.images.hasOwnProperty(identifier+number)) number++;
|
||||||
|
args.splice(0,0,identifier+number);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(args.length == format.length) {
|
if(args.length == format.length) {
|
||||||
|
|||||||
@@ -88,8 +88,12 @@ function formatInput(args,format,images) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (format[0] == "o_string" && format_i == "l" && args.length == 2) {
|
else if (format[0] == "o_string" && format_i == "l" && args.length == 2) {
|
||||||
if (typeof(args[0]) == "string")
|
if (typeof(args[0]) == "string") {
|
||||||
args.splice(0,0,"default");
|
identifier = "image";
|
||||||
|
number = 1;
|
||||||
|
while (this.images.hasOwnProperty(identifier+number)) number++;
|
||||||
|
args.splice(0,0,identifier+number);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(args.length == format.length) {
|
if(args.length == format.length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user