MCPcopy
hub / github.com/palantir/plottable / _getEntityStore

Method _getEntityStore

src/plots/plot.ts:838–859  ·  view source on GitHub ↗

* _getEntityStore returns the store of all Entities associated with the specified dataset * * @param {Dataset[]} [datasets] - The datasets with which to construct the store. If no datasets * are specified all datasets will be used.

(datasets?: Dataset[])

Source from the content-addressed store, hash-verified

836 * are specified all datasets will be used.
837 */
838 protected _getEntityStore(datasets?: Dataset[]): Utils.IEntityStore<Plots.ILightweightPlotEntity> {
839 const entityBoundsFactory = (entity: Plots.ILightweightPlotEntity) => this._entityBounds(entity);
840 if (datasets !== undefined) {
841 const entityStore = new Utils.EntityStore<Plots.ILightweightPlotEntity>();
842 entityStore.addAll(
843 this._buildLightweightPlotEntities(datasets),
844 entityBoundsFactory,
845 this._localOriginBounds(),
846 );
847 return entityStore;
848 } else if (this._cachedEntityStore === undefined) {
849 const entityStore = new Utils.EntityStore<Plots.ILightweightPlotEntity>();
850 entityStore.addAll(
851 this._buildLightweightPlotEntities(this.datasets()),
852 entityBoundsFactory,
853 this._localOriginBounds(),
854 );
855 this._cachedEntityStore = entityStore;
856 }
857
858 return this._cachedEntityStore;
859 }
860
861 /**
862 * _localOriginBounds returns bounds of the plot from its own origin, rather than from parent origin (as provided by `this.bounds()`)

Callers 8

entitiesMethod · 0.95
filterEntitiesMethod · 0.95
entityNearestMethod · 0.95
entitiesInBoundsMethod · 0.95
entitiesInXBoundsMethod · 0.95
entitiesInYBoundsMethod · 0.95
workerMethod · 0.80
_entitiesIntersectingMethod · 0.80

Calls 4

addAllMethod · 0.95
_localOriginBoundsMethod · 0.95
datasetsMethod · 0.95

Tested by

no test coverage detected