mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Format the files this branch wrote or broke with Prettier
This commit is contained in:
1 parent
227e3c2051
commit
8d7f055572
90 files changed
+1408
-640
No files matched your search
@@ -550,12 +550,13 @@ function anchorOnScreen(viewer, engine, anchor, root) {
|
||||
);
|
||||
if (Cesium.Cartesian3.dot(delta, camera.directionWC) <= 0) return null;
|
||||
}
|
||||
const pixel = engine ? engine.projector.worldToWindow(anchor, {}) : Cesium.SceneTransforms.worldToWindowCoordinates(
|
||||
viewer.scene,
|
||||
anchor,
|
||||
);
|
||||
const pixel = engine
|
||||
? engine.projector.worldToWindow(anchor, {})
|
||||
: Cesium.SceneTransforms.worldToWindowCoordinates(viewer.scene, anchor);
|
||||
if (!pixel) return null;
|
||||
const canvasBounds = (engine?.host.canvas ?? viewer?.canvas)?.getBoundingClientRect?.();
|
||||
const canvasBounds = (
|
||||
engine?.host.canvas ?? viewer?.canvas
|
||||
)?.getBoundingClientRect?.();
|
||||
const rootBounds = root.getBoundingClientRect?.();
|
||||
if (!canvasBounds || !rootBounds) return null;
|
||||
const x = pixel.x + canvasBounds.left - rootBounds.left;
|
||||
@@ -638,7 +639,11 @@ function createRoot(documentRef, viewer) {
|
||||
const root = documentRef.createElement('div');
|
||||
root.id = 'bhote-koshi-embedded-media-root';
|
||||
root.setAttribute('aria-live', 'polite');
|
||||
(documentRef.getElementById?.('cesiumContainer') || viewer?.container || documentRef.body)?.append(root);
|
||||
(
|
||||
documentRef.getElementById?.('cesiumContainer') ||
|
||||
viewer?.container ||
|
||||
documentRef.body
|
||||
)?.append(root);
|
||||
return root;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user