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

Function getIndex

packages/engine/Source/DataSources/DataSourceCollection.js:200–216  ·  view source on GitHub ↗
(dataSources, dataSource)

Source from the content-addressed store, hash-verified

198};
199
200function getIndex(dataSources, dataSource) {
201 //>>includeStart('debug', pragmas.debug);
202 if (!defined(dataSource)) {
203 throw new DeveloperError("dataSource is required.");
204 }
205 //>>includeEnd('debug');
206
207 const index = dataSources.indexOf(dataSource);
208
209 //>>includeStart('debug', pragmas.debug);
210 if (index === -1) {
211 throw new DeveloperError("dataSource is not in this collection.");
212 }
213 //>>includeEnd('debug');
214
215 return index;
216}
217
218function swapDataSources(collection, i, j) {
219 const arr = collection._dataSources;

Callers 1

Calls 1

definedFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…