|
|
@ -84,8 +84,15 @@ export class Renderer { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const urlParams = new URLSearchParams(window.location.search); |
|
|
|
|
|
|
|
const roadmapType = urlParams.get('r'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (roadmapType) { |
|
|
|
|
|
|
|
this.switchRoadmap(`/jsons/roadmaps/${roadmapType}.json`); |
|
|
|
|
|
|
|
} else { |
|
|
|
this.jsonToSvg(this.jsonUrl); |
|
|
|
this.jsonToSvg(this.jsonUrl); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
switchRoadmap(newJsonUrl) { |
|
|
|
switchRoadmap(newJsonUrl) { |
|
|
|
const newJsonFileSlug = newJsonUrl.split('/').pop().replace('.json', ''); |
|
|
|
const newJsonFileSlug = newJsonUrl.split('/').pop().replace('.json', ''); |
|
|
|