MCPcopy Create free account
hub / github.com/microsoft/SandDance / isNewBounds

Method isNewBounds

packages/vega-deck.gl/src/presenter.ts:244–253  ·  view source on GitHub ↗
(view: View, height: number, width: number, cubeCount: number)

Source from the content-addressed store, hash-verified

242 }
243
244 private isNewBounds(view: View, height: number, width: number, cubeCount: number) {
245 const lastBounds: IBounds = this.lastBounds();
246 for (const prop in lastBounds) {
247 if (lastBounds[prop] === null) return true;
248 }
249 const newBounds: IBounds = { cubeCount, height, view, width };
250 for (const prop in lastBounds) {
251 if (lastBounds[prop] !== newBounds[prop]) return true;
252 }
253 }
254
255 private lastBounds(): IBounds {
256 const { cubeCount, height, view, width } = this._last;

Callers 1

setDeckPropsMethod · 0.95

Calls 1

lastBoundsMethod · 0.95

Tested by

no test coverage detected