PageSourceSearch

https://proparcel.com/static/js/app/ui/buttons.js

js proparcel.com collected 2026-09-24 14:52:18 UTC 1,383 bytes, 40 lines download raw bytes

1/**
2 * UI Buttons Module
3 * Handles button initialization and layer visibility
4 */
5
6/**
7 * Button methods for ProParcelApp
8 */
9export function createButtonMethods(app) {
10    return {
11        /**
12         * Set initial layer visibility
13         */
14        setInitialLayerVisibility() {
15            // Default visible layers
16            const defaultVisibleLayers = ['quarter', 'parcel'];
17            
18            // Set visibility for all layers
19            Object.keys(window.defaultLayerStates || {}).forEach(layerName => {
20                const isVisible = defaultVisibleLayers.includes(layerName);
21                this.layerManager.setLayerVisibility('2d', layerName, isVisible);
22                this.layerManager.setLayerVisibility('3d', layerName, true); // 3D'de hepsi görünür
23                
24                // Update button state
25                const button = document.querySelector(`[data-target="${layerName}"]`);
26                if (button) {
27                    button.classList.toggle('active', isVisible);
28                }
29            });
30        },
31
32        /**
33         * Initialize buttons (delegated to layer-toggle-buttons.js)
34         */
35        initializeButtons() {
36            // Button initialization is handled by layer-toggle-buttons.js
37            // This prevents duplicate event listeners
38        }
39    };
40}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.