Skip to content

Commit

Permalink
Use vertexPositions in getBounds (#8247)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixpalmer committed Nov 14, 2023
1 parent b5108c8 commit ec6cf78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/layers/src/path-layer/path-layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ export default class PathLayer<DataT = any, ExtraPropsT extends {} = {}> extends
return false;
}

getBounds(): [number[], number[]] | null {
return this.getAttributeManager()?.getBounds(['vertexPositions']);
}

initializeState() {
const noAlloc = true;
const attributeManager = this.getAttributeManager();
Expand Down
4 changes: 4 additions & 0 deletions modules/layers/src/solid-polygon-layer/solid-polygon-layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ export default class SolidPolygonLayer<DataT = any, ExtraPropsT extends {} = {}>
return false;
}

getBounds(): [number[], number[]] | null {
return this.getAttributeManager()?.getBounds(['vertexPositions']);
}

initializeState() {
const {device, viewport} = this.context;
let {coordinateSystem} = this.props;
Expand Down

0 comments on commit ec6cf78

Please sign in to comment.