From 8da47a3c5a423d482431eebd6170615e5cd7b05c Mon Sep 17 00:00:00 2001 From: Eyal Soha Date: Thu, 7 Dec 2017 21:56:23 +0200 Subject: [PATCH] fix isNaN import and rebuild min.js --- octoprint_slicer/static/js/octoprint_slicer.min.js | 8 ++++---- src/slicer.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/octoprint_slicer/static/js/octoprint_slicer.min.js b/octoprint_slicer/static/js/octoprint_slicer.min.js index 35626b7..6eef4ab 100644 --- a/octoprint_slicer/static/js/octoprint_slicer.min.js +++ b/octoprint_slicer/static/js/octoprint_slicer.min.js @@ -36454,9 +36454,9 @@ function OverridesViewModel(parameters, array_keys, enum_keys, item_keys, boolea } } - _.forEach(result$$1, function (k) { + _.forEach(result$$1, function (v, k) { // If the value is undefined, must not be valid for this slicer. - if (result$$1[k] === undefined) { + if (k.startsWith("profile.") && result$$1[k] === undefined) { delete result$$1[k]; } }); @@ -38749,7 +38749,7 @@ function SlicerViewModel(parameters) { $("#slicer-viewport button#duplicate").click(function (event) { toggleValueInputs($("#slicer-viewport .more.values div")); var copies = parseInt(prompt("The number of copies you want to duplicate:", 1)); - if (!isNaN(copies)) { + if (!isNaN$1(copies)) { var originalFilename = self.stlViewPort.selectedModel().userData.filename; startLongRunning(self.stlViewPort.duplicateSelectedModel.bind(self, copies), function (models) { forEach$1(models, function (model) { @@ -39271,7 +39271,7 @@ function SlicerViewModel(parameters) { function applyValueInputs(input) { if (input[0].type == "checkbox" && input[0].id == "lock") { self.lockScale = input[0].checked; - } else if (input[0].type == "number" && !isNaN(parseFloat(input.val()))) { + } else if (input[0].type == "number" && !isNaN$1(parseFloat(input.val()))) { var model = self.stlViewPort.selectedModel(); if (model === undefined) return; diff --git a/src/slicer.js b/src/slicer.js index d108f4b..65a5b1b 100644 --- a/src/slicer.js +++ b/src/slicer.js @@ -15,7 +15,7 @@ import { OverridesViewModel } from './profile_overrides'; import { ModelArranger } from './ModelArranger'; import { ArrangeModels } from './ArrangeModels'; import { CheckerboardMaterial } from './CheckerboardMaterial'; -import { find, forEach, endsWith, some, extend, map, isNan } from 'lodash-es'; +import { find, forEach, endsWith, some, extend, map, isNaN } from 'lodash-es'; import { Chop } from './Chop'; function isDev() {