mirror of
https://github.com/bendtherules/react-vis-gridarea.git
synced 2026-08-18 13:51:59 +00:00
GridArea - Make class vars static + change arg obj to getAttributeScale
This commit is contained in:
+11
-5
@@ -47,11 +47,11 @@ const GridAreaPropTypes = {
|
||||
};
|
||||
|
||||
class GridArea extends PureComponent<GridAreaProps, {}> {
|
||||
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<GridAreaProps, {}> {
|
||||
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 (
|
||||
|
||||
Reference in New Issue
Block a user