Fixed 'Add Section' button to properly activate drawing mode
Deploy TrassenPlaner / deploy (push) Waiting to run
Details
Deploy TrassenPlaner / deploy (push) Waiting to run
Details
This commit is contained in:
parent
60eadc4d38
commit
0e5c3cb674
17
index.html
17
index.html
|
|
@ -2191,8 +2191,21 @@
|
||||||
// --- Variant Management UI ---
|
// --- Variant Management UI ---
|
||||||
window.startNewPath = (id) => {
|
window.startNewPath = (id) => {
|
||||||
const layer = routeLayers[id];
|
const layer = routeLayers[id];
|
||||||
if (layer && layer.editor) {
|
if (layer) {
|
||||||
layer.editor.newPath();
|
// Activate drawing state
|
||||||
|
state.isDrawing = true;
|
||||||
|
state.isMeasuring = false;
|
||||||
|
updateToolCursors();
|
||||||
|
|
||||||
|
// Ensure edit mode is on
|
||||||
|
if (!layer.editor) layer.enableEdit();
|
||||||
|
|
||||||
|
// Trigger new path drawing
|
||||||
|
if (layer.editor) {
|
||||||
|
layer.editor.newPath();
|
||||||
|
} else {
|
||||||
|
console.error("Editor not found on layer", id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue