From ebb93d9d2f0d912e4500465d2cf3204f21cb8b56 Mon Sep 17 00:00:00 2001 From: Doug Calobrisi Date: Fri, 20 May 2016 10:28:44 -0400 Subject: [PATCH 1/2] Corrects example URL in Slicing API Doc This fixes a simple typo in the API doc for fetching slicing profiles. The previous example had /profiles appended to it, whereas it should just be /api/slicing to fetch a list of all slicers and profiles. --- docs/api/slicing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/slicing.rst b/docs/api/slicing.rst index 5204da15..5a56b960 100644 --- a/docs/api/slicing.rst +++ b/docs/api/slicing.rst @@ -32,7 +32,7 @@ List All Slicers and Slicing Profiles .. sourcecode:: http - GET /api/slicing/profiles HTTP/1.1 + GET /api/slicing HTTP/1.1 Host: example.com X-Api-Key: abcdef... From 938251d755b8f1d62cc226466a8a1df3801648d6 Mon Sep 17 00:00:00 2001 From: Mark Walker Date: Thu, 26 May 2016 00:42:01 +0000 Subject: [PATCH 2/2] Fix condition on print volume check This should address #1354 --- src/octoprint/static/js/app/viewmodels/files.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/octoprint/static/js/app/viewmodels/files.js b/src/octoprint/static/js/app/viewmodels/files.js index 42639fa7..3c58b69e 100644 --- a/src/octoprint/static/js/app/viewmodels/files.js +++ b/src/octoprint/static/js/app/viewmodels/files.js @@ -487,24 +487,24 @@ $(function() { object: printingArea }; - info += _.sprintf(gettext("Object's bounding box: (%(object.minX).2f, %(object.minY).2f, %(object.minZ).2f) × (%(object.maxX).2f, %(object.maxY).2f, %(object.maxZ).2f)"), formatData); - info += "
"; - info += _.sprintf(gettext("Print volume: (%(profile.minX).2f, %(profile.minY).2f, %(profile.minZ).2f) × (%(profile.maxX).2f, %(profile.maxY).2f, %(profile.maxZ).2f)"), formatData); - // find exceeded dimensions if (printingArea["minX"] < boundaries["minX"] || printingArea["maxX"] > boundaries["maxX"]) { - info += gettext("
Object exceeds print volume in width."); + info += gettext("Object exceeds print volume in width.
"); } if (printingArea["minY"] < boundaries["minY"] || printingArea["maxY"] > boundaries["maxY"]) { - info += gettext("
Object exceeds print volume in depth."); + info += gettext("Object exceeds print volume in depth.
"); } if (printingArea["minZ"] < boundaries["minZ"] || printingArea["maxZ"] > boundaries["maxZ"]) { - info += gettext("
Object exceeds print volume in height."); + info += gettext("Object exceeds print volume in height.
"); } //warn user if (info != "") { if (notify) { + info += _.sprintf(gettext("Object's bounding box: (%(object.minX).2f, %(object.minY).2f, %(object.minZ).2f) × (%(object.maxX).2f, %(object.maxY).2f, %(object.maxZ).2f)"), formatData); + info += "
"; + info += _.sprintf(gettext("Print volume: (%(profile.minX).2f, %(profile.minY).2f, %(profile.minZ).2f) × (%(profile.maxX).2f, %(profile.maxY).2f, %(profile.maxZ).2f)"), formatData); + warning += pnotifyAdditionalInfo(info); new PNotify({