bruce-cesium 5.0.6 → 5.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bruce-cesium.es5.js +25 -26
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +25 -26
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/utils/drawing-utils.js +13 -7
- package/dist/lib/utils/drawing-utils.js.map +1 -1
- package/dist/lib/widgets/widget-cursorbar.js +25 -16
- package/dist/lib/widgets/widget-cursorbar.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/utils/drawing-utils.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -645,7 +645,7 @@ var DrawingUtils;
|
|
|
645
645
|
let cacheTimestamp = null;
|
|
646
646
|
let cachedCameraState = null;
|
|
647
647
|
let cachedPickOnlyState = null;
|
|
648
|
-
return (viewer, cursor, pickOnly = false) => {
|
|
648
|
+
return (viewer, cursor, pickOnly = false, ignoredPickOnly) => {
|
|
649
649
|
const scene = viewer.scene;
|
|
650
650
|
const camera = scene.camera;
|
|
651
651
|
// Check if we can use cached position.
|
|
@@ -686,12 +686,18 @@ var DrawingUtils;
|
|
|
686
686
|
pos3d = null;
|
|
687
687
|
const ray = scene.camera.getPickRay(cursor);
|
|
688
688
|
if (scene.pickPositionSupported) {
|
|
689
|
-
const
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
689
|
+
const pickedObjects = scene.drillPick(cursor, !(ignoredPickOnly === null || ignoredPickOnly === void 0 ? void 0 : ignoredPickOnly.length) ? 1 : ignoredPickOnly.length + 1, 3, 3);
|
|
690
|
+
for (let i = 0; i < pickedObjects.length; i++) {
|
|
691
|
+
let object = pickedObjects[i];
|
|
692
|
+
object = (object && object.id && object.id instanceof Entity ? object.id : object);
|
|
693
|
+
if (object &&
|
|
694
|
+
(!ignoredPickOnly || !ignoredPickOnly.includes(object)) &&
|
|
695
|
+
(object instanceof Cesium3DTileFeature ||
|
|
696
|
+
object instanceof Cesium3DTileset ||
|
|
697
|
+
(object instanceof Entity && object.model))) {
|
|
698
|
+
pos3d = scene.pickPosition(cursor);
|
|
699
|
+
break;
|
|
700
|
+
}
|
|
695
701
|
}
|
|
696
702
|
}
|
|
697
703
|
if (!pickOnly && !defined(pos3d)) {
|
|
@@ -26880,6 +26886,10 @@ class WidgetCursorBar extends Widget.AWidget {
|
|
|
26880
26886
|
</svg>
|
|
26881
26887
|
`;
|
|
26882
26888
|
this._generateSecondaryControl("Select", ESecondaryCursor.Select, () => {
|
|
26889
|
+
if (this._walkthroughPinEventRemoval) {
|
|
26890
|
+
this._walkthroughPinEventRemoval();
|
|
26891
|
+
this._walkthroughPinEventRemoval = null;
|
|
26892
|
+
}
|
|
26883
26893
|
this._selectedSecondaryCursor = ESecondaryCursor.Select;
|
|
26884
26894
|
this._listenSelection();
|
|
26885
26895
|
}, selectSvg);
|
|
@@ -26889,6 +26899,10 @@ class WidgetCursorBar extends Widget.AWidget {
|
|
|
26889
26899
|
</svg>
|
|
26890
26900
|
`;
|
|
26891
26901
|
this._generateSecondaryControl("Pan", ESecondaryCursor.Pan, () => {
|
|
26902
|
+
if (this._walkthroughPinEventRemoval) {
|
|
26903
|
+
this._walkthroughPinEventRemoval();
|
|
26904
|
+
this._walkthroughPinEventRemoval = null;
|
|
26905
|
+
}
|
|
26892
26906
|
if (this._selectedSecondaryCursor == ESecondaryCursor.Pan) {
|
|
26893
26907
|
this._selectedSecondaryCursor = ESecondaryCursor.Select;
|
|
26894
26908
|
this._listenSelection();
|
|
@@ -26918,6 +26932,7 @@ class WidgetCursorBar extends Widget.AWidget {
|
|
|
26918
26932
|
_initWalkthroughPin() {
|
|
26919
26933
|
if (this._walkthroughPinEventRemoval) {
|
|
26920
26934
|
this._walkthroughPinEventRemoval();
|
|
26935
|
+
this._walkthroughPinEventRemoval = null;
|
|
26921
26936
|
}
|
|
26922
26937
|
let pointer;
|
|
26923
26938
|
let events = new ScreenSpaceEventHandler(this._viewer.scene.canvas);
|
|
@@ -26936,35 +26951,20 @@ class WidgetCursorBar extends Widget.AWidget {
|
|
|
26936
26951
|
}
|
|
26937
26952
|
};
|
|
26938
26953
|
let dropPosition3d;
|
|
26939
|
-
let dropPosition2d;
|
|
26940
26954
|
let dropOnTerrain = false;
|
|
26941
26955
|
events.setInputAction((e) => {
|
|
26942
26956
|
const pos2d = e.endPosition;
|
|
26943
26957
|
// First try find a position on a 'thing'.
|
|
26944
26958
|
// This lets us put our pin underground if there is something there.
|
|
26945
|
-
let pos3d = DrawingUtils.GetAccuratePosition(this._viewer, pos2d, true);
|
|
26959
|
+
let pos3d = DrawingUtils.GetAccuratePosition(this._viewer, pos2d, true, pointer ? [pointer] : null);
|
|
26946
26960
|
dropOnTerrain = false;
|
|
26947
26961
|
// Fallback to position including terrain as an option.
|
|
26948
26962
|
if (!Cartes.ValidateCartes3(pos3d)) {
|
|
26949
|
-
pos3d = DrawingUtils.GetAccuratePosition(this._viewer, pos2d, false);
|
|
26963
|
+
pos3d = DrawingUtils.GetAccuratePosition(this._viewer, pos2d, false, pointer ? [pointer] : null);
|
|
26950
26964
|
dropOnTerrain = true;
|
|
26951
26965
|
}
|
|
26952
26966
|
if (Cartes.ValidateCartes3(pos3d)) {
|
|
26953
26967
|
dropPosition3d = pos3d;
|
|
26954
|
-
dropPosition2d = pos2d;
|
|
26955
|
-
if (!pointer) {
|
|
26956
|
-
pointer = this._viewer.entities.add({
|
|
26957
|
-
position: new CallbackProperty(() => dropPosition3d, false),
|
|
26958
|
-
point: {
|
|
26959
|
-
pixelSize: 10,
|
|
26960
|
-
color: Color.fromCssColorString("#33B1FF"),
|
|
26961
|
-
outlineColor: Color.WHITE,
|
|
26962
|
-
outlineWidth: 2,
|
|
26963
|
-
heightReference: HeightReference.NONE,
|
|
26964
|
-
show: true
|
|
26965
|
-
}
|
|
26966
|
-
});
|
|
26967
|
-
}
|
|
26968
26968
|
}
|
|
26969
26969
|
}, ScreenSpaceEventType.MOUSE_MOVE);
|
|
26970
26970
|
let processing = false;
|
|
@@ -26985,7 +26985,6 @@ class WidgetCursorBar extends Widget.AWidget {
|
|
|
26985
26985
|
dropOnTerrain = true;
|
|
26986
26986
|
}
|
|
26987
26987
|
dropPosition3d = pos3d;
|
|
26988
|
-
dropPosition2d = e.position;
|
|
26989
26988
|
}
|
|
26990
26989
|
let pos3d = dropPosition3d === null || dropPosition3d === void 0 ? void 0 : dropPosition3d.clone();
|
|
26991
26990
|
if (Cartes.ValidateCartes3(pos3d)) {
|
|
@@ -29361,7 +29360,7 @@ class WidgetViewBar extends Widget.AWidget {
|
|
|
29361
29360
|
}
|
|
29362
29361
|
}
|
|
29363
29362
|
|
|
29364
|
-
const VERSION = "5.0.
|
|
29363
|
+
const VERSION = "5.0.7";
|
|
29365
29364
|
|
|
29366
29365
|
export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, DataLabRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, CesiumAnimatedProperty, CesiumAnimatedInOut, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Walkthrough, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, WidgetNavCompass$$1 as WidgetNavCompass, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar, WidgetControlViewBar, WidgetControlViewBarSearch, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks };
|
|
29367
29366
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|