summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/mq_editor/app.js14
-rw-r--r--tools/mq_editor/index.html1
2 files changed, 15 insertions, 0 deletions
diff --git a/tools/mq_editor/app.js b/tools/mq_editor/app.js
index 862ec6c..b0b578b 100644
--- a/tools/mq_editor/app.js
+++ b/tools/mq_editor/app.js
@@ -255,6 +255,7 @@ function runExtraction() {
extractBtn.disabled = false;
autoSpreadAllBtn.disabled = false;
document.getElementById('newPartialBtn').disabled = false;
+ document.getElementById('clearAllBtn').disabled = false;
undoStack.length = 0; redoStack.length = 0; _updateUndoRedoBtns();
}, 50);
}
@@ -290,7 +291,20 @@ function createNewPartial() {
}
}
+function clearAllPartials() {
+ if (!extractedPartials || extractedPartials.length === 0) return;
+ pushUndo();
+ extractedPartials = [];
+ editor.setPartials([]);
+ if (viewer) {
+ viewer.setPartials([]);
+ viewer.setKeepCount(0);
+ viewer.selectPartial(-1);
+ }
+}
+
document.getElementById('newPartialBtn').addEventListener('click', createNewPartial);
+document.getElementById('clearAllBtn').addEventListener('click', clearAllPartials);
document.getElementById('undoBtn').addEventListener('click', undo);
document.getElementById('redoBtn').addEventListener('click', redo);
diff --git a/tools/mq_editor/index.html b/tools/mq_editor/index.html
index 49a9869..6cf691f 100644
--- a/tools/mq_editor/index.html
+++ b/tools/mq_editor/index.html
@@ -285,6 +285,7 @@
<button id="playBtn" disabled>▶ Play</button>
<button id="stopBtn" disabled>■ Stop</button>
<button id="newPartialBtn" disabled>+ Partial</button>
+ <button id="clearAllBtn" disabled>✕ Clear All</button>
<button id="undoBtn" disabled>↩ Undo</button>
<button id="redoBtn" disabled>↪ Redo</button>