Skip to content

Commit d05f821

Browse files
authored
Update script.js
1 parent 682aea5 commit d05f821

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

scripts/script.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -461,11 +461,11 @@ function objToYaml(obj) {
461461
obj.roomplans.forEach(obj => {
462462
string += "\t- name: " + obj.name + "\n";
463463
string += "\t\tpoints:" + "\n";
464-
string += "\t\t\t - [ " + Math.round(obj.x1 / 100) + ", " + Math.round(obj.y1 / 100) +"]\n";
465-
string += "\t\t\t - [ " + Math.round(obj.x2 / 100) + ", " + Math.round(obj.y1 / 100) +"]\n";
466-
string += "\t\t\t - [ " + Math.round(obj.x2 / 100) + ", " + Math.round(obj.y2 / 100) +"]\n";
467-
string += "\t\t\t - [ " + Math.round(obj.x1 / 100) + ", " + Math.round(obj.y2 / 100) +"]\n";
468-
string += "\t\t\t - [ " + Math.round(obj.x1 / 100) + ", " + Math.round(obj.y1 / 100) +"]\n";
464+
string += "\t\t\t - [ " + (Math.round(obj.x1)/100) + ", " + (Math.round(obj.y1)/100) +"]\n";
465+
string += "\t\t\t - [ " + (Math.round(obj.x2)/100) + ", " + (Math.round(obj.y1)/100) +"]\n";
466+
string += "\t\t\t - [ " + (Math.round(obj.x2)/100) + ", " + (Math.round(obj.y2)/100) +"]\n";
467+
string += "\t\t\t - [ " + (Math.round(obj.x1)/100) + ", " + (Math.round(obj.y2)/100) +"]\n";
468+
string += "\t\t\t - [ " + (Math.round(obj.x1)/100) + ", " + (Math.round(obj.y1)/100) +"]\n";
469469
});
470470

471471
string += "nodes: \n";
@@ -474,7 +474,7 @@ function objToYaml(obj) {
474474
var x = currentUnit == "m" ? Math.abs(probe.x - firstCoordinateOffsetX) : Math.abs(probe.x - firstCoordinateOffsetX)/3.2808;
475475
var y = currentUnit == "m" ? Math.abs(probe.y - firstCoordinateOffsetY) : Math.abs(probe.y - firstCoordinateOffsetY)/3.2808;
476476
string += "\t- name: " + probe.name +"\n";
477-
string += "\tpoint: [" + + Math.round(x / 100) + "," + (y / 100) + "," + Math.round(y / 100) + ", 0]\n";
477+
string += "\tpoint: [" + (Math.round(x)/100) + "," + (Math.round(y) / 100) + ", 0]\n";
478478
string += "\tfloors: [\"first\"]\n";
479479
});
480480
});

0 commit comments

Comments
 (0)