Skip to content

Commit

Permalink
XEOK-53 Use Zone::volume in an example
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalDybizbanskiCreoox committed Jul 4, 2024
1 parent 45610ff commit 65b0373
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/zone/ZonesPlugin_createZones.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ <h3>Resources</h3>

container: document.getElementById("annotationsContainer"),

markerHTML: "<div class='annotation-marker' style='background-color: {{markerBGColor}};'>{{glyph}}</div>",
markerHTML: "<div class='annotation-marker' style='background-color: {{markerBGColor}};'>&nbsp;{{glyph}}&nbsp;{{volume}}u²&nbsp;</div>",
labelHTML: "<div class='annotation-label' style='background-color: {{labelBGColor}};'><div class='annotation-title'>{{title}}</div><div class='annotation-desc'>{{description}}</div></div>",

values: {
Expand All @@ -222,6 +222,7 @@ <h3>Resources</h3>
description: description
},
});
annotation.setMarkerAlign("center");
adjustZoneAnnotation(zone);

zone.on("destroyed", () => annotation.destroy());
Expand All @@ -240,6 +241,7 @@ <h3>Resources</h3>
if (pos)
{
zoneAnnotation.worldPos = pos;
zoneAnnotation.setField("volume", zone.volume.toFixed(2));
}
}
};
Expand Down

0 comments on commit 65b0373

Please sign in to comment.