@reearth/core 0.0.7-alpha.51 → 0.0.7-alpha.53
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.d.ts
CHANGED
|
@@ -1727,7 +1727,7 @@ declare type TimelineCommit = (PlayCommand | PauseCommand | SetTimeCommand | Set
|
|
|
1727
1727
|
};
|
|
1728
1728
|
|
|
1729
1729
|
export declare type TimelineCommitter = {
|
|
1730
|
-
source:
|
|
1730
|
+
source: string;
|
|
1731
1731
|
id?: string;
|
|
1732
1732
|
};
|
|
1733
1733
|
|
package/package.json
CHANGED
|
@@ -61,13 +61,7 @@ export type TimelineCommit = (PlayCommand | PauseCommand | SetTimeCommand | SetO
|
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
export type TimelineCommitter = {
|
|
64
|
-
source:
|
|
65
|
-
| "widgetContext"
|
|
66
|
-
| "pluginAPI"
|
|
67
|
-
| "featureResource"
|
|
68
|
-
| "storyTimelineBlock"
|
|
69
|
-
| "storyPage"
|
|
70
|
-
| "initialize";
|
|
64
|
+
source: string;
|
|
71
65
|
id?: string;
|
|
72
66
|
};
|
|
73
67
|
|
|
@@ -111,11 +111,6 @@ export default function Resource({
|
|
|
111
111
|
[layer, viewer, onComputedFeatureFetch, type, requestRender],
|
|
112
112
|
);
|
|
113
113
|
|
|
114
|
-
const initialClock = useRef({
|
|
115
|
-
start: timelineManagerRef?.current?.timeline?.start,
|
|
116
|
-
stop: timelineManagerRef?.current?.timeline?.stop,
|
|
117
|
-
current: timelineManagerRef?.current?.timeline?.current,
|
|
118
|
-
});
|
|
119
114
|
const handleLoad = useCallback(
|
|
120
115
|
(ds: DataSource) => {
|
|
121
116
|
ds.entities.values.forEach(e =>
|
|
@@ -128,28 +123,7 @@ export default function Resource({
|
|
|
128
123
|
});
|
|
129
124
|
}),
|
|
130
125
|
);
|
|
131
|
-
if (
|
|
132
|
-
if (
|
|
133
|
-
initialClock.current.current &&
|
|
134
|
-
initialClock.current.start &&
|
|
135
|
-
initialClock.current.stop
|
|
136
|
-
) {
|
|
137
|
-
timelineManagerRef?.current?.commit({
|
|
138
|
-
cmd: "SET_TIME",
|
|
139
|
-
payload: {
|
|
140
|
-
start: initialClock.current.start,
|
|
141
|
-
stop: initialClock.current.stop,
|
|
142
|
-
current: initialClock.current.current,
|
|
143
|
-
},
|
|
144
|
-
committer: {
|
|
145
|
-
source: "featureResource",
|
|
146
|
-
id: layer?.id,
|
|
147
|
-
},
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
if (ds.clock) {
|
|
126
|
+
if (updateClock && ds.clock) {
|
|
153
127
|
timelineManagerRef?.current?.commit({
|
|
154
128
|
cmd: "SET_TIME",
|
|
155
129
|
payload: {
|
|
@@ -160,7 +160,8 @@ const Cesium: React.ForwardRefRenderFunction<EngineRef, EngineProps> = (
|
|
|
160
160
|
onMouseMove={mouseEventHandles.mouseMove}
|
|
161
161
|
onMouseEnter={mouseEventHandles.mouseEnter}
|
|
162
162
|
onMouseLeave={mouseEventHandles.mouseLeave}
|
|
163
|
-
onWheel={mouseEventHandles.wheel}
|
|
163
|
+
onWheel={mouseEventHandles.wheel}
|
|
164
|
+
automaticallyTrackDataSourceClocks={false}>
|
|
164
165
|
<Event onMount={handleMount} onUnmount={handleUnmount} />
|
|
165
166
|
<Clock timelineManagerRef={timelineManagerRef} />
|
|
166
167
|
<ImageryLayers
|