www/gcode_viewer_card.js
This commit is contained in:
@@ -55,9 +55,7 @@ class GcodeViewerCard extends HTMLElement {
|
|||||||
|
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
this._attached = true;
|
this._attached = true;
|
||||||
if (this._threeReady) {
|
this._ensureBuilt();
|
||||||
this._ensureBuilt();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnectedCallback() {
|
disconnectedCallback() {
|
||||||
@@ -486,8 +484,8 @@ class GcodeViewerCard extends HTMLElement {
|
|||||||
if (this._extSegs) { this._scene.remove(this._extSegs); this._extSegs.geometry.dispose(); }
|
if (this._extSegs) { this._scene.remove(this._extSegs); this._extSegs.geometry.dispose(); }
|
||||||
if (this._travelSegs) { this._scene.remove(this._travelSegs); this._travelSegs.geometry.dispose(); }
|
if (this._travelSegs) { this._scene.remove(this._travelSegs); this._travelSegs.geometry.dispose(); }
|
||||||
|
|
||||||
const extColor = cssVar("--gcode-extrusion-color", EXT_COLOR.replace("var(--gcode-extrusion-color, ", "").replace(")", ""));
|
const extColor = cssVar("--gcode-extrusion-color", EXT_COLOR);
|
||||||
const travColor = cssVar("--gcode-travel-color", TRAVEL_COLOR.replace("var(--gcode-travel-color, ", "").replace(")", ""));
|
const travColor = cssVar("--gcode-travel-color", TRAVEL_COLOR);
|
||||||
|
|
||||||
this._extSegs = mk(extPos, extColor);
|
this._extSegs = mk(extPos, extColor);
|
||||||
this._travelSegs = mk(travPos, travColor);
|
this._travelSegs = mk(travPos, travColor);
|
||||||
|
|||||||
Reference in New Issue
Block a user