move some stats to events

This commit is contained in:
Stewart Allen 2020-04-18 11:34:54 -04:00
commit 194284f16d
3 changed files with 8 additions and 13 deletions

View file

@ -24,7 +24,7 @@ let gs_kiri_export = exports;
function exportPrint() {
let currentPrint = API.print.get();
if (currentPrint) {
STATS.add(`ua_${API.mode.get_lower()}_export`);
API.event.emit('export', API.mode.get());
switch (API.mode.get()) {
case 'LASER': return exportPrintLaser(currentPrint);
case 'FDM': return exportPrintGCODE(currentPrint);