mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-28 21:48:34 +01:00
Change popup-marker to always be in front of other markers
This commit is contained in:
parent
240ca6c00e
commit
fa966c4363
@ -43,6 +43,7 @@ export class PopupMarker extends Marker {
|
||||
|
||||
this.elementObject = new CSS2DObject(htmlToElement(`<div id="bm-marker-${this.data.id}" class="bm-marker-${this.data.type}">Test</div>`));
|
||||
this.elementObject.position.set(0.5, 1, 0.5);
|
||||
this.elementObject.disableDepthTest = true;
|
||||
this.addEventListener( 'removed', () => {
|
||||
if (this.element.parentNode) this.element.parentNode.removeChild(this.element);
|
||||
});
|
||||
|
@ -208,7 +208,8 @@ var CSS2DRenderer = function (events = null) {
|
||||
|
||||
for ( var i = 0, l = sorted.length; i < l; i ++ ) {
|
||||
|
||||
sorted[ i ].element.style.zIndex = zMax - i;
|
||||
let o = sorted[ i ];
|
||||
o.element.style.zIndex = o.disableDepthTest ? zMax + 1 : zMax - i;
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user