@reearth/core 0.0.7-alpha.46 → 0.0.7-alpha.48
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
|
@@ -112,7 +112,7 @@ export default ({ init, engineRef, timelineManagerRef }: Props) => {
|
|
|
112
112
|
const currentTime = current.getTime();
|
|
113
113
|
|
|
114
114
|
const convertedStartTime = startTime > currentTime ? currentTime : startTime;
|
|
115
|
-
const convertedStopTime = stopTime
|
|
115
|
+
const convertedStopTime = stopTime < currentTime ? currentTime + DEFAULT_RANGE : stopTime;
|
|
116
116
|
|
|
117
117
|
return {
|
|
118
118
|
start: new Date(convertedStartTime),
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
GroundPrimitive,
|
|
18
18
|
} from "cesium";
|
|
19
19
|
import md5 from "js-md5";
|
|
20
|
-
import { pick } from "lodash-es";
|
|
20
|
+
import { cloneDeep, pick } from "lodash-es";
|
|
21
21
|
import {
|
|
22
22
|
ComponentProps,
|
|
23
23
|
ComponentType,
|
|
@@ -236,13 +236,20 @@ export const extractSimpleLayer = (
|
|
|
236
236
|
if (l?.type !== "simple") {
|
|
237
237
|
return;
|
|
238
238
|
}
|
|
239
|
-
|
|
239
|
+
// Proxy object lead to issues when creating mvt imagery provider, so convert to plain object
|
|
240
|
+
// Not sure for other types, but to keep consistency, convert all simple layers here
|
|
241
|
+
// It should be okey since simple layer data is supposed to be simple enough and computed data should not be included
|
|
242
|
+
return toPlainObject(l);
|
|
240
243
|
};
|
|
241
244
|
|
|
242
245
|
export const extractSimpleLayerData = (layer: ComputedLayer | undefined): Data | undefined => {
|
|
243
246
|
return extractSimpleLayer(layer)?.data;
|
|
244
247
|
};
|
|
245
248
|
|
|
249
|
+
export const toPlainObject = <T,>(obj: T): T => {
|
|
250
|
+
return cloneDeep(obj);
|
|
251
|
+
};
|
|
252
|
+
|
|
246
253
|
export const toColor = (c?: string) => {
|
|
247
254
|
if (!c || typeof c !== "string") return undefined;
|
|
248
255
|
|