Skip to content

Commit

Permalink
Merge pull request #70 from equinor/zIndex_fix
Browse files Browse the repository at this point in the history
Change zIndex target from wellbore to container
  • Loading branch information
olems authored Jun 20, 2023
2 parents 28203fa + 5a14cfc commit a46f1cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@equinor/videx-map",
"version": "1.14.1",
"version": "1.14.2",
"description": "Component for Pixi-overlay in Leaflet.",
"main": "dist/index.js",
"module": "dist/index.esm.js",
Expand Down
12 changes: 7 additions & 5 deletions src/utils/wellbores/data/WellboreData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ export class WellboreData {

set zIndex (val: number) {
this._zIndex = val;
if (this.mesh) this.mesh.zIndex = this._zIndex;
if (this.container) {
this.container.zIndex = this._zIndex;
}
}

get colors(): Colors {
Expand Down Expand Up @@ -206,7 +208,7 @@ export class WellboreData {
if (this.mesh) {
this.mesh.shader.uniforms.wellboreColor1 = color.col1;
this.mesh.shader.uniforms.wellboreColor2 = color.col2;
this.mesh.zIndex = this._zIndex + 100000;
this.container.zIndex = this._zIndex + 100000;
}
this.label.container.zIndex = 1;
this.label.background.tint = color.labelBg;
Expand All @@ -216,7 +218,7 @@ export class WellboreData {
if (this.mesh) {
this.mesh.shader.uniforms.wellboreColor1 = this.colors.default.col1;
this.mesh.shader.uniforms.wellboreColor2 = this.colors.default.col2;
this.mesh.zIndex = this._zIndex;
this.container.zIndex = this._zIndex;
}
this.label.container.zIndex = 0;
this.label.background.tint = this.colors.default.labelBg;
Expand All @@ -232,7 +234,7 @@ export class WellboreData {
if (this.mesh) {
this.mesh.shader.uniforms.wellboreColor1 = this.colors.selected.col1;
this.mesh.shader.uniforms.wellboreColor2 = this.colors.selected.col2;
this.mesh.zIndex = this._zIndex + 1000000;
this.container.zIndex = this._zIndex + 1000000;
}
this.label.container.zIndex = 1;
this.label.background.tint = this.colors.selected.labelBg;
Expand All @@ -241,7 +243,7 @@ export class WellboreData {
if (this.mesh) {
this.mesh.shader.uniforms.wellboreColor1 = this.colors.default.col1;
this.mesh.shader.uniforms.wellboreColor2 = this.colors.default.col2;
this.mesh.zIndex = this._zIndex;
this.container.zIndex = this._zIndex;
}
this.label.container.zIndex = 0;
this.label.background.tint = this.colors.default.labelBg;
Expand Down

0 comments on commit a46f1cd

Please sign in to comment.