@reearth/core 0.0.7-alpha.27 → 0.0.7-alpha.29

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reearth/core",
3
- "version": "0.0.7-alpha.27",
3
+ "version": "0.0.7-alpha.29",
4
4
  "author": "Re:Earth contributors <community@reearth.io>",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A library that abstracts a map engine as one common API.",
@@ -401,7 +401,9 @@ export default function ({
401
401
  cancelEditRef.current();
402
402
  }
403
403
  if (type === undefined) {
404
- overrideInteractionModeRef.current?.("default");
404
+ overrideInteractionModeRef.current?.(
405
+ interactionModeRef.current === "sketch" ? "default" : interactionModeRef.current,
406
+ );
405
407
  }
406
408
  }, [type]);
407
409
 
@@ -560,8 +560,8 @@ export default ({
560
560
  if (pickRay) {
561
561
  const l = await scene.imageryLayers.pickImageryLayerFeatures(pickRay, scene);
562
562
 
563
- // NOTE: For now we only send the first selected feature to onLayerSelect instead of sending all of them: @pyshx
564
- const f = l?.[0];
563
+ // Find the topmost overlaid feature.
564
+ const f = l?.findLast(f => !!f.data);
565
565
 
566
566
  const appearanceType = f?.data?.appearanceType;
567
567