mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-22 23:39:45 +00:00
@@ -20,7 +20,7 @@ export class ClipspaceDialog extends ComfyDialog {
|
||||
|
||||
static invalidatePreview() {
|
||||
if(ComfyApp.clipspace && ComfyApp.clipspace.imgs && ComfyApp.clipspace.imgs.length > 0) {
|
||||
const img_preview = document.getElementById("clipspace_preview");
|
||||
const img_preview = document.getElementById("clipspace_preview") as HTMLImageElement;
|
||||
if(img_preview) {
|
||||
img_preview.src = ComfyApp.clipspace.imgs[ComfyApp.clipspace['selectedIndex']].src;
|
||||
img_preview.style.maxHeight = "100%";
|
||||
@@ -57,7 +57,7 @@ export class ClipspaceDialog extends ComfyDialog {
|
||||
super();
|
||||
}
|
||||
|
||||
createButtons(self) {
|
||||
createButtons() {
|
||||
const buttons = [];
|
||||
|
||||
for(let idx in ClipspaceDialog.items) {
|
||||
@@ -107,7 +107,7 @@ export class ClipspaceDialog extends ComfyDialog {
|
||||
[
|
||||
$el("option", {value:'selected'}, 'selected'),
|
||||
$el("option", {value:'all'}, 'all')
|
||||
]);
|
||||
]) as HTMLSelectElement;
|
||||
combo2.value = ComfyApp.clipspace['img_paste_mode'];
|
||||
|
||||
const row2 =
|
||||
@@ -141,7 +141,7 @@ export class ClipspaceDialog extends ComfyDialog {
|
||||
show() {
|
||||
const img_preview = document.getElementById("clipspace_preview");
|
||||
ClipspaceDialog.invalidate();
|
||||
|
||||
|
||||
this.element.style.display = "block";
|
||||
}
|
||||
}
|
||||
@@ -152,7 +152,7 @@ app.registerExtension({
|
||||
app.openClipspace =
|
||||
function () {
|
||||
if(!ClipspaceDialog.instance) {
|
||||
ClipspaceDialog.instance = new ClipspaceDialog(app);
|
||||
ClipspaceDialog.instance = new ClipspaceDialog();
|
||||
ComfyApp.clipspace_invalidate_handler = ClipspaceDialog.invalidate;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user