@vesium/plot 1.0.1-beta.70 → 1.0.1-beta.73

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/index.mjs CHANGED
@@ -489,7 +489,7 @@ function useRender(plots, current, getCurrentTime) {
489
489
  const primitiveCollection = usePrimitive(new PrimitiveCollection());
490
490
  const groundPrimitiveCollection = usePrimitive(new PrimitiveCollection(), { collection: "ground" });
491
491
  const dataSource = useDataSource(new CustomDataSource());
492
- const entityScope = useEntityScope({ collection: () => dataSource.value.entities });
492
+ const entityScope = useEntityScope({ collection: () => dataSource.value?.entities });
493
493
  const primitiveScope = usePrimitiveScope({ collection: () => primitiveCollection.value });
494
494
  const groundPrimitiveScope = usePrimitiveScope({ collection: () => groundPrimitiveCollection.value });
495
495
  const mouseCartesian = shallowRef();
@@ -686,17 +686,18 @@ function useSkeleton(plots, current, getCurrentTime) {
686
686
  onCleanup(graphicEvent.add("global", "DRAG", ({ event, pick, dragging, lockCamera }) => {
687
687
  if (pick.id instanceof PlotSkeletonEntity && entityScope.scope.has(pick.id)) {
688
688
  const entity = pick.id;
689
- const plot = entity.plot;
690
- if (plot.defining) return;
689
+ const feature = entity.plot;
690
+ if (feature.defining) return;
691
691
  activeEntity.value = entity;
692
692
  const skeleton = entity.skeleton;
693
693
  const index = entity.index;
694
- const packable = plot.sampled.getValue(getCurrentTime());
694
+ const packable = feature.sampled.getValue(getCurrentTime());
695
695
  skeleton.onDrag?.({
696
696
  viewer: viewer.value,
697
- sampled: plot.sampled,
697
+ feature,
698
+ sampled: feature.sampled,
698
699
  packable,
699
- active: current.value === plot,
700
+ active: current.value === feature,
700
701
  index,
701
702
  event,
702
703
  dragging,
@@ -721,13 +722,14 @@ function useSkeleton(plots, current, getCurrentTime) {
721
722
  onKeyStroke((keyEvent) => {
722
723
  if (activeEntity.value) {
723
724
  const entity = activeEntity.value;
724
- const plot = entity.plot;
725
+ const feature = entity.plot;
725
726
  const skeleton = entity.skeleton;
726
727
  const index = entity.index;
727
- const packable = plot.sampled.getValue(getCurrentTime());
728
+ const packable = feature.sampled.getValue(getCurrentTime());
728
729
  skeleton.onKeyPressed?.({
729
730
  viewer: viewer.value,
730
- sampled: plot.sampled,
731
+ feature,
732
+ sampled: feature.sampled,
731
733
  packable,
732
734
  index,
733
735
  keyEvent
@@ -745,16 +747,17 @@ function useSkeleton(plots, current, getCurrentTime) {
745
747
  if (pick.id instanceof PlotSkeletonEntity && entityScope.scope.has(pick.id)) {
746
748
  const entity = pick.id;
747
749
  activeEntity.value = entity;
748
- const plot = entity.plot;
750
+ const feature = entity.plot;
749
751
  const skeleton = entity.skeleton;
750
752
  const index = entity.index;
751
- const packable = plot.sampled.getValue(getCurrentTime());
753
+ const packable = feature.sampled.getValue(getCurrentTime());
752
754
  skeleton.onLeftClick?.({
753
755
  viewer: viewer.value,
754
- sampled: plot.sampled,
756
+ feature,
757
+ sampled: feature.sampled,
755
758
  packable,
756
- active: current.value === plot,
757
- defining: plot.defining,
759
+ active: current.value === feature,
760
+ defining: feature.defining,
758
761
  index,
759
762
  event
760
763
  });