Skip to content

Commit fa966c4

Browse files
committed
Change popup-marker to always be in front of other markers
1 parent 240ca6c commit fa966c4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

BlueMapCommon/webapp/src/js/PopupMarker.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export class PopupMarker extends Marker {
4343

4444
this.elementObject = new CSS2DObject(htmlToElement(`<div id="bm-marker-${this.data.id}" class="bm-marker-${this.data.type}">Test</div>`));
4545
this.elementObject.position.set(0.5, 1, 0.5);
46+
this.elementObject.disableDepthTest = true;
4647
this.addEventListener( 'removed', () => {
4748
if (this.element.parentNode) this.element.parentNode.removeChild(this.element);
4849
});

BlueMapCommon/webapp/src/js/util/CSS2DRenderer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ var CSS2DRenderer = function (events = null) {
208208

209209
for ( var i = 0, l = sorted.length; i < l; i ++ ) {
210210

211-
sorted[ i ].element.style.zIndex = zMax - i;
211+
let o = sorted[ i ];
212+
o.element.style.zIndex = o.disableDepthTest ? zMax + 1 : zMax - i;
212213

213214
}
214215

0 commit comments

Comments
 (0)