Skip to content

Commit 63f1d29

Browse files
committed
Release 1.0.1
1 parent 78f373a commit 63f1d29

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

release/component/component.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ function Main()
6464
}
6565
function UpdateURL()
6666
{
67-
let url = "@" + round(ME.Camera.Location.X, 2) + "," + round(ME.Camera.Location.Y, 2) + "," + round(ME.Camera.Location.Z, 2) + "z" + ((RenderedFloor / 2) + 1);
68-
//url += "?graph=" + JSON.stringify(graph.ToJson());
67+
let url = "?@" + round(ME.Camera.Location.X, 2) + "," + round(ME.Camera.Location.Y, 2) + "," + round(ME.Camera.Location.Z, 2) + "z" + ((RenderedFloor / 2) + 1);
68+
//url += "&graph=" + JSON.stringify(graph.ToJson());
6969

7070
window.dispatchEvent(new CustomEvent("_event_onURLChange", { detail: { camera: round(ME.Camera.Location.X, 2) + ", " + round(ME.Camera.Location.Y, 2) + ", " + round(ME.Camera.Location.Z, 2) } }));
7171
window.history.replaceState({ "html": url }, "", url)
@@ -80,7 +80,7 @@ function ParseURL()
8080
if (url.includes("@"))
8181
{
8282
let paramstr = url.substring(url.indexOf("@") + 1);
83-
if (paramstr.includes("?"))
83+
if (paramstr.includes("&"))
8484
{
8585
paramstr = paramstr.substring(0, url.indexOf("?"));
8686
}
@@ -353,9 +353,10 @@ function _event_onNavigationSelect(event)
353353
}
354354
else if (navigation === "_navigation_file_link")
355355
{
356-
let url = window.location;
357-
url += "@" + round(ME.Camera.Location.X, 2) + "," + round(ME.Camera.Location.Y, 2) + "," + round(ME.Camera.Location.Z, 2) + "z" + ((RenderedFloor / 2) + 1);
358-
url += "?graph=" + JSON.stringify(graph.ToJson());
356+
console.log(window.location);
357+
let url = window.location.origin;
358+
url += "/bench/?@" + round(ME.Camera.Location.X, 2) + "," + round(ME.Camera.Location.Y, 2) + "," + round(ME.Camera.Location.Z, 2) + "z" + ((RenderedFloor / 2) + 1);
359+
url += "&graph=" + JSON.stringify(graph.ToJson());
359360
alert(url);
360361
}
361362
else if (navigation === "_navigation_about")

src/public/component/component.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ function Main()
6464
}
6565
function UpdateURL()
6666
{
67-
let url = "@" + round(ME.Camera.Location.X, 2) + "," + round(ME.Camera.Location.Y, 2) + "," + round(ME.Camera.Location.Z, 2) + "z" + ((RenderedFloor / 2) + 1);
68-
//url += "?graph=" + JSON.stringify(graph.ToJson());
67+
let url = "?@" + round(ME.Camera.Location.X, 2) + "," + round(ME.Camera.Location.Y, 2) + "," + round(ME.Camera.Location.Z, 2) + "z" + ((RenderedFloor / 2) + 1);
68+
//url += "&graph=" + JSON.stringify(graph.ToJson());
6969

7070
window.dispatchEvent(new CustomEvent("_event_onURLChange", { detail: { camera: round(ME.Camera.Location.X, 2) + ", " + round(ME.Camera.Location.Y, 2) + ", " + round(ME.Camera.Location.Z, 2) } }));
7171
window.history.replaceState({ "html": url }, "", url)
@@ -80,7 +80,7 @@ function ParseURL()
8080
if (url.includes("@"))
8181
{
8282
let paramstr = url.substring(url.indexOf("@") + 1);
83-
if (paramstr.includes("?"))
83+
if (paramstr.includes("&"))
8484
{
8585
paramstr = paramstr.substring(0, url.indexOf("?"));
8686
}
@@ -353,9 +353,10 @@ function _event_onNavigationSelect(event)
353353
}
354354
else if (navigation === "_navigation_file_link")
355355
{
356-
let url = window.location;
357-
url += "@" + round(ME.Camera.Location.X, 2) + "," + round(ME.Camera.Location.Y, 2) + "," + round(ME.Camera.Location.Z, 2) + "z" + ((RenderedFloor / 2) + 1);
358-
url += "?graph=" + JSON.stringify(graph.ToJson());
356+
console.log(window.location);
357+
let url = window.location.origin;
358+
url += "/bench/?@" + round(ME.Camera.Location.X, 2) + "," + round(ME.Camera.Location.Y, 2) + "," + round(ME.Camera.Location.Z, 2) + "z" + ((RenderedFloor / 2) + 1);
359+
url += "&graph=" + JSON.stringify(graph.ToJson());
359360
alert(url);
360361
}
361362
else if (navigation === "_navigation_about")

0 commit comments

Comments
 (0)