feat: удаление последнего измерения и очистка всех измерений

This commit is contained in:
Maxim Dolgolyov
2026-04-14 14:05:40 +03:00
parent 74fe2c4179
commit d822b705c4
2 changed files with 65 additions and 21 deletions
+10
View File
@@ -3670,6 +3670,8 @@
<div style="display:flex;flex-wrap:wrap;gap:4px;margin-bottom:4px">
<button class="gp-btn" id="stereo-unfold-btn" onclick="stereoUnfold(this)">Развёртка</button>
<button class="gp-btn" id="stereo-measure-btn" onclick="stereoMeasure(this)">Измерение</button>
<button class="gp-btn" onclick="stereoMeasureUndo()">Удалить посл.</button>
<button class="gp-btn" onclick="stereoMeasureClear()">Очистить</button>
</div>
<div class="gp-section-title" style="margin-top:8px">Углы и расстояния</div>
@@ -8223,6 +8225,14 @@
if (stereoSim) stereoSim.toggleMeasure(on);
}
function stereoMeasureUndo() {
if (stereoSim) stereoSim.removeLastMeasurement();
}
function stereoMeasureClear() {
if (stereoSim) stereoSim.clearMeasurements();
}
function stereoToggleHeight(btn) {
const on = !btn.classList.contains('active');
btn.classList.toggle('active', on);