mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-20 21:30:09 +08:00
fix fitToScreen and adjustBrushSize funcs in zoom.js
This commit is contained in:
parent
ca7ba7d394
commit
733f8c7c51
@ -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…
Reference in New Issue
Block a user