MCPcopy
hub / github.com/CesiumGS/cesium / subscribeAll

Function subscribeAll

packages/engine/Source/DataSources/CompositeProperty.js:8–21  ·  view source on GitHub ↗
(property, eventHelper, definitionChanged, intervals)

Source from the content-addressed store, hash-verified

6import Property from "./Property.js";
7
8function subscribeAll(property, eventHelper, definitionChanged, intervals) {
9 function callback() {
10 definitionChanged.raiseEvent(property);
11 }
12 const items = [];
13 eventHelper.removeAll();
14 const length = intervals.length;
15 for (let i = 0; i < length; i++) {
16 const interval = intervals.get(i);
17 if (defined(interval.data) && items.indexOf(interval.data) === -1) {
18 eventHelper.add(interval.data.definitionChanged, callback);
19 }
20 }
21}
22
23/**
24 * A {@link Property} which is defined by a {@link TimeIntervalCollection}, where the

Callers 1

Calls 4

removeAllMethod · 0.80
definedFunction · 0.50
getMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…