Removing rudimentary variables from ResponsiveVennDiagram and VennDiagram

[x] childrenWidth/childrenHeight were removed, have beed used previously for non-responsive SVG
[x] this.ZOrder array was removed, since there is another way of soring z-indices
[x] translate was removed, since now it's the part of viewPortParameters string ((-this.width / 2) + ' ' + (-this.height / 2))
This commit is contained in:
vkuchinov 2019-08-26 09:59:36 +03:00
parent 01996a59ee
commit e4a03ce3e0
2 changed files with 0 additions and 9 deletions

View File

@ -12,13 +12,6 @@ class ResponsiveVennDiagram extends React.Component {
render() {
const {pillarsGrades} = this.props;
let childrenWidth = this.props.containerWidth, childrenHeight = this.props.containerHeight;
if (childrenHeight === 0 || isNaN(childrenHeight)) {
childrenHeight = childrenWidth;
} else {
childrenWidth = Math.min(childrenWidth, childrenHeight)
}
return (
<div ref={this.divElement} style={{textAlign: 'center'}}>

View File

@ -13,7 +13,6 @@ class VennDiagram extends React.Component {
this.state = {tooltip: {top: 0, left: 0, display: 'none', html: ''}};
this.width = this.height = 512;
this.zOrder = [];
this.colors = ['#777777', '#D9534F', '#F0AD4E', '#5CB85C'];
this.prefix = 'vennDiagram';
@ -208,7 +207,6 @@ class VennDiagram extends React.Component {
} else {
// equivalent to center translate (width/2, height/2)
let viewPortParameters = (-this.width / 2) + ' ' + (-this.height / 2) + ' ' + this.width + ' ' + this.height;
let translate = 'translate(' + this.width / 2 + ',' + this.height / 2 + ')';
let nodes = Object.values(this.layout).map((d_, i_) => {
if (d_.hasOwnProperty('cx')) {