mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-20 06:27:04 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dff2d36b44 | ||
|
|
810647276b | ||
|
|
a54b91f704 |
@@ -56,8 +56,13 @@ export class NetworkManager extends EventTarget {
|
|||||||
name = name.replace('.glb', '').replace('.gltf', '');
|
name = name.replace('.glb', '').replace('.gltf', '');
|
||||||
} else {
|
} else {
|
||||||
// If there is a #name parameter in the URL, use it as the name
|
// If there is a #name parameter in the URL, use it as the name
|
||||||
let urlObj = new URL(url);
|
let hashParams: URLSearchParams
|
||||||
let hashParams = new URLSearchParams(urlObj.hash.slice(1));
|
try {
|
||||||
|
let urlObj = new URL(url, window.location.href);
|
||||||
|
hashParams = new URLSearchParams(urlObj.hash.slice(1));
|
||||||
|
} catch (e) {
|
||||||
|
hashParams = new URLSearchParams();
|
||||||
|
}
|
||||||
if (hashParams.has("name")) {
|
if (hashParams.has("name")) {
|
||||||
name = hashParams.get("name") || `unknown-${Math.random()}`;
|
name = hashParams.get("name") || `unknown-${Math.random()}`;
|
||||||
} else { // Default to the last part of the URL as the "name" of the model
|
} else { // Default to the last part of the URL as the "name" of the model
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yet-another-cad-viewer",
|
"name": "yet-another-cad-viewer",
|
||||||
"version": "0.10.7",
|
"version": "0.10.8",
|
||||||
"description": "",
|
"description": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "yacv-server"
|
name = "yacv-server"
|
||||||
version = "0.10.7"
|
version = "0.10.8"
|
||||||
description = "Yet Another CAD Viewer (server)"
|
description = "Yet Another CAD Viewer (server)"
|
||||||
authors = ["Yeicor <4929005+Yeicor@users.noreply.github.com>"]
|
authors = ["Yeicor <4929005+Yeicor@users.noreply.github.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|||||||
Reference in New Issue
Block a user