Commit 8fd20bd4 authored by Aarni Koskela's avatar Aarni Koskela
Browse files

Zoom and Pan: move helpers into its namespace to avoid littering global scope

parent 9781f31f
Loading
Loading
Loading
Loading
+95 −97
Original line number Diff line number Diff line
onUiLoaded(async() => {
    // Helper functions
    // Get active tab
    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
     * very long images.
     */

    function restoreImgRedMask(elements, elementIDs) {
        const mainTabId = getTabId(elements, elementIDs);

@@ -114,8 +114,6 @@ function restoreImgRedMask(elements, elementIDs) {
        }, 400);
    }

// Main
onUiLoaded(async() => {
    const hotkeysConfigOpts = await waitForOpts();

    // Default config