fix(solvespace): Tries fix k526s-adapter-assy on Android

Restore
This commit is contained in:
sovanna 2019-08-12 14:51:56 +02:00
parent b1872eb755
commit 6c8546bf6d
2 changed files with 7 additions and 13 deletions
content/software
templates

View File

@ -99,13 +99,6 @@ The KF25 adapter for the cold head is a much simpler device:
{% layout_treejs(two=true) %}
<div id="k526s-adapter"></div>
<div id="k526s-adapter-assy"></div>
<script id="k526s-adapter-assy" type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
var node = document.getElementById("k526s-adapter-assy"),
params = {width: 400, height: 300, scale: 8};
node.parentNode.replaceChild(solvespace(solvespace_model_k526s_adapter_assy, params), node);
});
</script>
{% end %}

View File

@ -83,17 +83,18 @@
id: 'k526s-adapter',
model: solvespace_model_k526s_adapter,
params: params_k526s_adapter,
}/*, {
}, {
id: 'k526s-adapter-assy',
model: solvespace_model_k526s_adapter_assy,
params: params_k526s_assy,
}*/];
var node;
}, {}];
for (var i = nodes.length - 1; i >= 0; i--) {
node = document.getElementById(nodes[i].id);
node.parentNode.replaceChild(solvespace(nodes[i].model, nodes[i].params), node);
let n = nodes[i];
if (n.id) {
let node = document.getElementById(n.id);
node.parentNode.replaceChild(solvespace(n.model, n.params), node);
}
}
})();