From 05e54fa0c6a735aa17ea00f19783f728e25360e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 1 Dec 2014 16:36:08 +0100 Subject: [PATCH] Internal representation for extruder offsets changed, adjusted gcode viewer view model to be able to cope --- src/octoprint/static/js/app/viewmodels/gcode.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/octoprint/static/js/app/viewmodels/gcode.js b/src/octoprint/static/js/app/viewmodels/gcode.js index bf6691d1..24ab6823 100644 --- a/src/octoprint/static/js/app/viewmodels/gcode.js +++ b/src/octoprint/static/js/app/viewmodels/gcode.js @@ -164,7 +164,11 @@ function GcodeViewModel(loginStateViewModel, settingsViewModel) { } if (currentProfileData && currentProfileData.extruder && currentProfileData.extruder.offsets()) { - return currentProfileData.extruder.offsets(); + var offsets = []; + _.each(currentProfileData.extruder.offsets(), function(offset) { + offsets.push({x: offset[0], y: offset[1]}) + }); + return offsets; } else { return undefined; }