* _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[])
| 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()`) |
no test coverage detected