Merge branch 'rel-4.6' into rel-4.6-support

This commit is contained in:
Stewart Allen 2026-01-05 15:33:47 -05:00
commit c31c723392
2 changed files with 19 additions and 12 deletions

View file

@ -130,10 +130,16 @@ class Widget extends WidgetCore {
}
}
/**
* Set edge rendering
*/
setEdges(set) {
clearTimeout(this._setimer);
if (set === true && this.outline) {
this._setimer = setTimeout(() => this._setEdges(set), 10);
} else {
this._setEdges(set);
}
}
_setEdges(set) {
if (!(this.api && this.api.conf)) {
// missing api features in engine mode
return;
@ -145,7 +151,6 @@ class Widget extends WidgetCore {
if (this.outline) {
mesh.remove(this.outline);
this.outline = null;
}
if (set) {
let dark = this.api.space.is_dark();

View file

@ -442,12 +442,10 @@ class Widget {
}
_updateMeshPosition() {
let mesh = this.mesh,
track = this.track,
tzoff = track.tzoff,
top = track.top,
tz = -tzoff,
{ x, y, z } = track.pos;
let { cache, mesh, track } = this,
{ top, tzoff } = track,
{ x, y, z } = track.pos,
tz = -tzoff;
if (track.indexed) {
this.mesh.rotation.x = -track.indexRad;
z = top;
@ -455,8 +453,12 @@ class Widget {
this.mesh.rotation.x = 0;
z += tz;
}
mesh.position.set(x, y, z);
this._updateEdges();
let { pos } = cache;
if (!pos || pos.x !== x || pos.y !==y || pos.z !== z) {
mesh.position.set(x, y, z);
this._updateEdges();
cache.pos = { x, y, z };
}
}
_updateEdges() {