mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
monkey-patch multi-image
Co-authored-by: Copilot <copilot@github.com> Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -8,11 +8,15 @@ function controlInputMode(inputMode, ...args) {
|
||||
const tabNames = ['Image', 'Video', 'Batch', 'Folder'];
|
||||
let inputTab = tabNames[tabIdx] || 'Image';
|
||||
log('controlInputMode', { mode: inputMode, tab: inputTab, kanvas: typeof Kanvas });
|
||||
|
||||
// if kanvas is available overwrite image inputs with kanvas images
|
||||
if ((inputTab === 'Image') && (typeof 'Kanvas' !== 'undefined')) {
|
||||
inputTab = 'Kanvas';
|
||||
args[0] = window.kanvas.getImage();
|
||||
args[1] = window.kanvas.getImage(); // TODO support separate control
|
||||
for (let i = 0; i < window.kanvas.stages.maxStages; i++) {
|
||||
args[4 + i] = window.kanvas.getImage(1 + i, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
return [inputTab, ...args];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user