fix(map): keep ghost pin stems terrain-relative
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFile } from "node:fs/promises";
|
||||
import test from "node:test";
|
||||
|
||||
import {
|
||||
@@ -30,3 +31,14 @@ test("advanceGhostPins turns an escaping pin back toward its anchor", () => {
|
||||
assert.ok(geodesicDistanceMeters(anchor, advanced) < 990);
|
||||
assert.ok(advanced.heading_degrees > 260 && advanced.heading_degrees < 280);
|
||||
});
|
||||
|
||||
test("ghost pin stems stay terrain-relative after asynchronous tile loading", async () => {
|
||||
const source = await readFile(
|
||||
new URL("../src/CesiumMapRenderer.tsx", import.meta.url),
|
||||
"utf8",
|
||||
);
|
||||
|
||||
assert.match(source, /new runtime\.Cesium\.CallbackPositionProperty/);
|
||||
assert.match(source, /new runtime\.Cesium\.CallbackProperty/);
|
||||
assert.match(source, /depthFailMaterial: fillColor/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user