mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-03-11 01:01:04 -07:00
fix fitToScreen and adjustBrushSize funcs in zoom.js
This commit is contained in:
parent
ca7ba7d394
commit
733f8c7c51
1 changed files with 5 additions and 5 deletions
|
|
@ -395,7 +395,7 @@ onUiLoaded(async() => {
|
|||
targetElement.style.transform = `scale(${elemData[elemId].zoomLevel}) translate(${elemData[elemId].panX}px, ${elemData[elemId].panY}px)`;
|
||||
|
||||
const canvas = gradioApp().querySelector(
|
||||
`${elemId} canvas[key="interface"]`
|
||||
`${elemId} canvas`
|
||||
);
|
||||
|
||||
toggleOverlap("off");
|
||||
|
|
@ -456,10 +456,10 @@ onUiLoaded(async() => {
|
|||
) {
|
||||
const input =
|
||||
gradioApp().querySelector(
|
||||
`${elemId} input[aria-label='Brush radius']`
|
||||
`${elemId} input[type='range']`
|
||||
) ||
|
||||
gradioApp().querySelector(
|
||||
`${elemId} button[aria-label="Use brush"]`
|
||||
`${elemId} button[aria-label="Size button"]`
|
||||
);
|
||||
|
||||
if (input) {
|
||||
|
|
@ -602,7 +602,7 @@ onUiLoaded(async() => {
|
|||
// Fullscreen mode
|
||||
function fitToScreen() {
|
||||
const canvas = gradioApp().querySelector(
|
||||
`${elemId} canvas[key="interface"]`
|
||||
`${elemId} canvas`
|
||||
);
|
||||
|
||||
// print(canvas)
|
||||
|
|
@ -724,7 +724,7 @@ onUiLoaded(async() => {
|
|||
|
||||
targetElement.isExpanded = false;
|
||||
function autoExpand() {
|
||||
const canvas = document.querySelector(`${elemId} canvas[key="interface"]`);
|
||||
const canvas = document.querySelector(`${elemId} canvas`);
|
||||
if (canvas) {
|
||||
if (hasHorizontalScrollbar(targetElement) && targetElement.isExpanded === false) {
|
||||
targetElement.style.visibility = "hidden";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue