Skip to content

Commit 11a0594

Browse files
khaledsherkawiahmed-mrbeam
authored andcommitted
SW-1055 Release 0.10.1-hotfix.2 (mrbeam#1436)
Fixed The issue Where some users are not able to use their Inkscape SVG designs after updating to v0.10.1-hotfix.1
1 parent 2a04b86 commit 11a0594

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

octoprint_mrbeam/__version.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
"""
2-
Version of Mr beam plugin
3-
"""
4-
__version__ = "0.10.3"
1+
__version__ = "0.10.1-hotfix.2"

octoprint_mrbeam/static/js/working_area.js

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,12 +1191,26 @@ $(function () {
11911191
}
11921192
if (declaredUnit === "px" || declaredUnit === "") {
11931193
if (generator.generator === "inkscape") {
1194-
if (
1195-
window.compareVersions(
1196-
generator.version,
1194+
let isOldInkscapeVersion = NaN;
1195+
try {
1196+
isOldInkscapeVersion= window.compareVersions(
1197+
// 1.1.2 (1:1.1+202202050950+0a00cf5339) -> 1.1
1198+
generator.version.split('.').slice(0,2).join('.'),
11971199
"0.91"
1198-
) <= 0
1199-
) {
1200+
) <= 0;
1201+
} catch(e) {
1202+
let payload = {
1203+
error: e.message,
1204+
};
1205+
self._sendAnalytics("inkscape_version_comparison_error", payload);
1206+
console.log("inkscape_version_comparison_error: ", e);
1207+
// In case the comparison fails, we assume the version to be above 0.91
1208+
// This assumption (the scaling) does not have a major impact as it has
1209+
// been the case in the plugin up till 0.10.1-hotfix.2
1210+
isOldInkscapeVersion = true;
1211+
}
1212+
1213+
if (isOldInkscapeVersion) {
12001214
// console.log("old inkscape, px @ 90dpi");
12011215
declaredUnit = "px_inkscape_old";
12021216
} else {

0 commit comments

Comments
 (0)