()
| 21 | }, |
| 22 | |
| 23 | calcPositionStyle(){ |
| 24 | const {position, width} = this.props |
| 25 | const {display} = this.state; |
| 26 | let cord = display ? 0 : width; |
| 27 | |
| 28 | switch(position){ |
| 29 | case 'left': |
| 30 | return {transform: `translate3d(${-cord}px, 0, 0)`, |
| 31 | width: `${width}px`, |
| 32 | left: 0, |
| 33 | top: 0} |
| 34 | case 'top': |
| 35 | return {transform: `translate3d(0, ${-cord}px, 0)`, |
| 36 | height: `${width}px`, |
| 37 | left: 0, |
| 38 | top: 0} |
| 39 | case 'bottom': |
| 40 | return {transform: `translate3d(0, ${cord}px, 0)`, |
| 41 | height: `${width}px`, |
| 42 | left: 0, |
| 43 | bottom: 0} |
| 44 | default: |
| 45 | return {transform: `translate3d(${cord}px, 0, 0)`, |
| 46 | width: `${width}px`, |
| 47 | right:0, |
| 48 | top:0} |
| 49 | } |
| 50 | }, |
| 51 | |
| 52 | open(){ |
| 53 | this.setState({ |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…