mirror of
https://github.com/openvinotoolkit/stable-diffusion-webui.git
synced 2024-12-15 07:03:06 +03:00
Zoom and Pan: move helpers into its namespace to avoid littering global scope
This commit is contained in:
parent
9781f31f74
commit
8fd20bd4c3
@ -1,3 +1,4 @@
|
|||||||
|
onUiLoaded(async() => {
|
||||||
// Helper functions
|
// Helper functions
|
||||||
// Get active tab
|
// Get active tab
|
||||||
function getActiveTab(elements, all = false) {
|
function getActiveTab(elements, all = false) {
|
||||||
@ -79,7 +80,6 @@ function createHotkeyConfig(defaultHotkeysConfig, hotkeysConfigOpts) {
|
|||||||
* to avoid breaking the canvas. Additionally, the function adjusts the mask to work correctly on
|
* to avoid breaking the canvas. Additionally, the function adjusts the mask to work correctly on
|
||||||
* very long images.
|
* very long images.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function restoreImgRedMask(elements, elementIDs) {
|
function restoreImgRedMask(elements, elementIDs) {
|
||||||
const mainTabId = getTabId(elements, elementIDs);
|
const mainTabId = getTabId(elements, elementIDs);
|
||||||
|
|
||||||
@ -114,8 +114,6 @@ function restoreImgRedMask(elements, elementIDs) {
|
|||||||
}, 400);
|
}, 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Main
|
|
||||||
onUiLoaded(async() => {
|
|
||||||
const hotkeysConfigOpts = await waitForOpts();
|
const hotkeysConfigOpts = await waitForOpts();
|
||||||
|
|
||||||
// Default config
|
// Default config
|
||||||
|
Loading…
Reference in New Issue
Block a user