Add Location toggle-off fix + INSPIRE HILUCS workshop PPTX
- Default interaction mode changed from 'addLocation' to 'none' so that opening the app does not silently arm the Add-Location cursor; users must explicitly click the Add button to enter that mode. - Add button now toggles: a second click returns to 'none' mode, matching the behaviour of the Measure and Draw buttons. - All other tool buttons (Circle, Line, Area, Draw) now return to 'none' on toggle-off instead of re-activating Add-Location. - Removed the hard-coded 'active' CSS class from the Add button in index.html, consistent with the new default state. - Added INSPIRE_HILUCS_Workshop.pptx (13 slides) as a workshop reference deck covering INSPIRE Land Use Data Specifications, the HILUCS hierarchy (3 levels, 13 top-level classes), example HILUCS↔LUPMIS2 zone-code mappings, and a structured PROs/CONs analysis for LUSPA adoption, including a pragmatic localisation recommendation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4d594f58e5
commit
3479b00d83
BIN
INSPIRE_HILUCS_Workshop.pptx
Normal file
BIN
INSPIRE_HILUCS_Workshop.pptx
Normal file
Binary file not shown.
@ -1689,7 +1689,7 @@
|
|||||||
|
|
||||||
<!-- Bottom Dock -->
|
<!-- Bottom Dock -->
|
||||||
<div class="bottom-dock">
|
<div class="bottom-dock">
|
||||||
<button class="dock-btn active" type="button" id="dock-btn-add-location" title="Add Location Mode">
|
<button class="dock-btn" type="button" id="dock-btn-add-location" title="Add Location Mode">
|
||||||
<span>📍</span>
|
<span>📍</span>
|
||||||
<span class="dock-btn-label">Add</span>
|
<span class="dock-btn-label">Add</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
36
main.js
36
main.js
@ -140,10 +140,14 @@ let embedBridge = null;
|
|||||||
const EMBED_CONFIG = (typeof window !== 'undefined' && window.LUPMIS_EMBED) || null;
|
const EMBED_CONFIG = (typeof window !== 'undefined' && window.LUPMIS_EMBED) || null;
|
||||||
const IS_EMBED_PERMIT = !!(EMBED_CONFIG && EMBED_CONFIG.mode === 'permit');
|
const IS_EMBED_PERMIT = !!(EMBED_CONFIG && EMBED_CONFIG.mode === 'permit');
|
||||||
|
|
||||||
// Current interaction mode: 'addLocation' | 'measureCircle' | 'measureLine' | 'measureArea'
|
// Current interaction mode: 'none' | 'addLocation' | 'measureCircle' |
|
||||||
// In embed permit mode we don't want the default Add-Location click to fire,
|
// 'measureLine' | 'measureArea' | 'draw' | 'embed-permit'.
|
||||||
// so start the mode in a neutral state.
|
// Default is 'none' — a neutral state where map clicks do not trigger
|
||||||
let currentMode = IS_EMBED_PERMIT ? 'embed-permit' : 'addLocation';
|
// the Add-Location popup. Users explicitly opt into Add-Location by
|
||||||
|
// pressing the Add button in the bottom dock; pressing it again toggles
|
||||||
|
// the mode back off. Measurement / Draw tools also return to 'none'
|
||||||
|
// when toggled off, rather than implicitly re-entering Add-Location.
|
||||||
|
let currentMode = IS_EMBED_PERMIT ? 'embed-permit' : 'none';
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Application Initialization
|
// Application Initialization
|
||||||
@ -705,11 +709,18 @@ function initUI() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add Location mode button
|
// Add Location mode button — toggles. Clicking it once activates the
|
||||||
|
// mode (subsequent map-clicks open the Add-Location popup); clicking it
|
||||||
|
// again returns to the neutral 'none' mode so accidental map taps don't
|
||||||
|
// trigger the popup.
|
||||||
if (addLocationBtn) {
|
if (addLocationBtn) {
|
||||||
addLocationBtn.addEventListener('click', () => {
|
addLocationBtn.addEventListener('click', () => {
|
||||||
console.log('[Button] Add Location clicked');
|
console.log('[Button] Add Location clicked, currentMode is:', currentMode);
|
||||||
setMode('addLocation', addLocationBtn);
|
if (currentMode === 'addLocation') {
|
||||||
|
setMode('none', null); // toggle off
|
||||||
|
} else {
|
||||||
|
setMode('addLocation', addLocationBtn); // activate
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -718,8 +729,9 @@ function initUI() {
|
|||||||
measureCircleBtn.addEventListener('click', () => {
|
measureCircleBtn.addEventListener('click', () => {
|
||||||
console.log('[Button] Circle clicked, currentMode is:', currentMode);
|
console.log('[Button] Circle clicked, currentMode is:', currentMode);
|
||||||
if (currentMode === 'measureCircle') {
|
if (currentMode === 'measureCircle') {
|
||||||
// Toggle off - return to addLocation mode
|
// Toggle off — return to the neutral 'none' mode (no implicit
|
||||||
setMode('addLocation', addLocationBtn);
|
// Add-Location re-activation).
|
||||||
|
setMode('none', null);
|
||||||
} else {
|
} else {
|
||||||
setMode('measureCircle', measureCircleBtn);
|
setMode('measureCircle', measureCircleBtn);
|
||||||
}
|
}
|
||||||
@ -731,7 +743,7 @@ function initUI() {
|
|||||||
measureLineBtn.addEventListener('click', () => {
|
measureLineBtn.addEventListener('click', () => {
|
||||||
console.log('[Button] Line clicked, currentMode is:', currentMode);
|
console.log('[Button] Line clicked, currentMode is:', currentMode);
|
||||||
if (currentMode === 'measureLine') {
|
if (currentMode === 'measureLine') {
|
||||||
setMode('addLocation', addLocationBtn);
|
setMode('none', null);
|
||||||
} else {
|
} else {
|
||||||
setMode('measureLine', measureLineBtn);
|
setMode('measureLine', measureLineBtn);
|
||||||
}
|
}
|
||||||
@ -743,7 +755,7 @@ function initUI() {
|
|||||||
measureAreaBtn.addEventListener('click', () => {
|
measureAreaBtn.addEventListener('click', () => {
|
||||||
console.log('[Button] Area clicked, currentMode is:', currentMode);
|
console.log('[Button] Area clicked, currentMode is:', currentMode);
|
||||||
if (currentMode === 'measureArea') {
|
if (currentMode === 'measureArea') {
|
||||||
setMode('addLocation', addLocationBtn);
|
setMode('none', null);
|
||||||
} else {
|
} else {
|
||||||
setMode('measureArea', measureAreaBtn);
|
setMode('measureArea', measureAreaBtn);
|
||||||
}
|
}
|
||||||
@ -755,7 +767,7 @@ function initUI() {
|
|||||||
drawBtn.addEventListener('click', () => {
|
drawBtn.addEventListener('click', () => {
|
||||||
console.log('[Button] Draw clicked, currentMode is:', currentMode);
|
console.log('[Button] Draw clicked, currentMode is:', currentMode);
|
||||||
if (currentMode === 'draw') {
|
if (currentMode === 'draw') {
|
||||||
setMode('addLocation', addLocationBtn);
|
setMode('none', null);
|
||||||
} else {
|
} else {
|
||||||
setMode('draw', drawBtn);
|
setMode('draw', drawBtn);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user