diff --git a/src/grid-area.tsx b/src/grid-area.tsx index d2fd8e6..6d8c099 100644 --- a/src/grid-area.tsx +++ b/src/grid-area.tsx @@ -47,11 +47,11 @@ const GridAreaPropTypes = { }; class GridArea extends PureComponent { - displayName = 'GridArea'; - propTypes = GridAreaPropTypes; - defaultProps = {}; + static displayName = 'GridArea'; + static propTypes = GridAreaPropTypes; + static defaultProps = {}; - requiresSVG = true; + static requiresSVG = true; render() { const { @@ -67,7 +67,13 @@ class GridArea extends PureComponent { const tickYAttr = isVertical ? 'x' : 'y'; const length = isVertical ? height : width; - const scale = getAttributeScale(this.props, 'y'); + const scale = getAttributeScale({ + ...this.props, + width, + height, + top, + left + }, 'y'); const values = [[4, 5.76], [8.5, 11.25]]; return (