Skip to content

Commit

Permalink
Turn alert popup for XML request failure into console error (#866)
Browse files Browse the repository at this point in the history
In case the geometry data fails to load (for whatever reason), the alert popup provides no meaningful information for users.
Turning it into a console error reduces the popup inconvenience.
  • Loading branch information
straight-shoota authored Nov 10, 2024
1 parent f0eb339 commit 6e6ee5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/js/_viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ function Viewer3D(container) {
computeNormals();
animate();
} else {
alert("xml request error: " + _req.statusText);
console.error("xml request error: " + _req.status + " (" + _req.statusText + ")");
}
}
}
Expand All @@ -347,7 +347,7 @@ function Viewer3D(container) {
} else if (window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
}
alert("Can't find XML Http Request object!");
console.error("Can't find XML Http Request object!");
}

function mouseDownHandler(event) {
Expand Down Expand Up @@ -377,4 +377,4 @@ function Viewer3D(container) {
}

self.shader("flat", 200, 200, 200);
}
}

0 comments on commit 6e6ee5f

Please sign in to comment.