mirror of
https://github.com/bendtherules/react-vis-gridarea.git
synced 2026-08-18 22:02:23 +00:00
Reverse props direction meaning
This commit is contained in:
+3
-2
@@ -77,7 +77,8 @@ class GridArea extends PureComponent<GridAreaProps, {}> {
|
||||
|
||||
const style = {...GridArea.defaultStyle, ...this.props.style};
|
||||
|
||||
const isVertical = (this.props.direction === Direction.VERTICAL);
|
||||
const axisDirection = (this.props.direction === Direction.VERTICAL ? Direction.HORIZONTAL : Direction.VERTICAL);
|
||||
const isVertical = (axisDirection === Direction.VERTICAL);
|
||||
|
||||
const primaryAxisName = isVertical ? 'y' : 'x';
|
||||
const crossAxisName = isVertical ? 'x' : 'y';
|
||||
@@ -115,7 +116,7 @@ class GridArea extends PureComponent<GridAreaProps, {}> {
|
||||
[primaryAxisName]: minPos,
|
||||
[primaryLengthAttr]: maxPos - minPos,
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<rect
|
||||
{...rectProps}
|
||||
|
||||
Reference in New Issue
Block a user