Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const layerViewContext = this.layerViewContext(viewContext);
this.willUpdate(layerViewContext);
if (((updateFlags | this._updateFlags) & View.NeedsCompute) !== 0) {
this._updateFlags = this._updateFlags & ~View.NeedsCompute;
this.doCompute(layerViewContext);
}
if (((updateFlags | this._updateFlags) & View.NeedsAnimate) !== 0) {
this._updateFlags = this._updateFlags & ~View.NeedsAnimate;
this.doAnimate(layerViewContext);
}
if (((updateFlags | this._updateFlags) & MapView.NeedsProject) !== 0) {
this._updateFlags = this._updateFlags & ~MapView.NeedsProject;
this.doProject(layerViewContext);
}
if (((updateFlags | this._updateFlags) & View.NeedsLayout) !== 0) {
this._updateFlags = this._updateFlags & ~View.NeedsLayout;
this.doLayout(layerViewContext);
}
if (((updateFlags | this._updateFlags) & View.NeedsScroll) !== 0) {
this._updateFlags = this._updateFlags & ~View.NeedsScroll;
this.doScroll(layerViewContext);
}
if (((updateFlags | this._updateFlags) & View.NeedsRender) !== 0) {
this._updateFlags = this._updateFlags & ~View.NeedsRender;
this.doRender(layerViewContext);
}
this.onUpdate(layerViewContext);
this.doUpdateChildViews(updateFlags, layerViewContext);
this.didUpdate(layerViewContext);
}
protected onSetBounds(newBounds: BoxR2, oldBounds: BoxR2): void {
if (!newBounds.equals(oldBounds)) {
this.resizeCanvas(this._canvas, newBounds);
this.requireUpdate(View.NeedsLayout);
}
}
doUpdate(updateFlags: number, viewContext: MapViewContext): void {
const layerViewContext = this.layerViewContext(viewContext);
this.willUpdate(layerViewContext);
if (((updateFlags | this._updateFlags) & View.NeedsCompute) !== 0) {
this._updateFlags = this._updateFlags & ~View.NeedsCompute;
this.doCompute(layerViewContext);
}
if (((updateFlags | this._updateFlags) & View.NeedsAnimate) !== 0) {
this._updateFlags = this._updateFlags & ~View.NeedsAnimate;
this.doAnimate(layerViewContext);
}
if (((updateFlags | this._updateFlags) & MapView.NeedsProject) !== 0) {
this._updateFlags = this._updateFlags & ~MapView.NeedsProject;
this.doProject(layerViewContext);
}
if (((updateFlags | this._updateFlags) & View.NeedsLayout) !== 0) {
this._updateFlags = this._updateFlags & ~View.NeedsLayout;
this.doLayout(layerViewContext);
}
if (((updateFlags | this._updateFlags) & View.NeedsScroll) !== 0) {
this._updateFlags = this._updateFlags & ~View.NeedsScroll;
this.doScroll(layerViewContext);
}
if (((updateFlags | this._updateFlags) & View.NeedsRender) !== 0) {
this._updateFlags = this._updateFlags & ~View.NeedsRender;
this.doRender(layerViewContext);
}
this.onUpdate(layerViewContext);
this.doUpdateChildViews(updateFlags, layerViewContext);
this.didUpdate(layerViewContext);
}