mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-07-21 21:01:24 +08:00
ratio overlay
This commit is contained in:
parent
659d735e44
commit
7740ebe149
@ -22,22 +22,22 @@ function dimensionChange(e, is_width, is_height) {
|
||||
if (tabIndex == 0) {
|
||||
// img2img
|
||||
targetElement = gradioApp().querySelector(
|
||||
"#img2img_image div[class=forge-image-container] img",
|
||||
"#img2img_image div.forge-image-container img",
|
||||
);
|
||||
} else if (tabIndex == 1) {
|
||||
// Sketch
|
||||
targetElement = gradioApp().querySelector(
|
||||
"#img2img_sketch div[class=forge-image-container] img",
|
||||
"#img2img_sketch div.forge-image-container img",
|
||||
);
|
||||
} else if (tabIndex == 2) {
|
||||
// Inpaint
|
||||
targetElement = gradioApp().querySelector(
|
||||
"#img2maskimg div[class=forge-image-container] img",
|
||||
"#img2maskimg div.forge-image-container img",
|
||||
);
|
||||
} else if (tabIndex == 3) {
|
||||
// Inpaint sketch
|
||||
targetElement = gradioApp().querySelector(
|
||||
"#inpaint_sketch div[class=forge-image-container] img",
|
||||
"#inpaint_sketch div.forge-image-container img",
|
||||
);
|
||||
} else if (tabIndex == 4) {
|
||||
// Inpaint upload
|
||||
|
||||
@ -6,19 +6,11 @@
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.forge-image-container-plain {
|
||||
width: 100%;
|
||||
height: calc(100% - 6px);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
.forge-image-container.plain {
|
||||
background-color: #808080;
|
||||
}
|
||||
|
||||
.forge-image-container {
|
||||
width: 100%;
|
||||
height: calc(100% - 6px);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
.forge-image-container:not(.plain) {
|
||||
background-color: #cccccc;
|
||||
background-image:
|
||||
linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee),
|
||||
@ -29,6 +21,13 @@
|
||||
10px 10px;
|
||||
}
|
||||
|
||||
.forge-image-container {
|
||||
width: 100%;
|
||||
height: calc(100% - 6px);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.forge-image {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
||||
@ -128,7 +128,7 @@ class ForgeCanvas:
|
||||
canvas_html_uuid = canvas_html.replace("forge_mixin", self.uuid)
|
||||
|
||||
if opts.forge_canvas_plain:
|
||||
canvas_html_uuid = canvas_html_uuid.replace('class="forge-image-container"', 'class="forge-image-container-plain"').replace('stroke="white"', "stroke=#444")
|
||||
canvas_html_uuid = canvas_html_uuid.replace('class="forge-image-container"', 'class="forge-image-container plain"').replace('stroke="white"', "stroke=#444")
|
||||
if opts.forge_canvas_toolbar_always:
|
||||
canvas_html_uuid = canvas_html_uuid.replace('class="forge-toolbar"', 'class="forge-toolbar-static"')
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user