()
| 236 | } |
| 237 | |
| 238 | componentDidMount() { |
| 239 | this.updateOffsetFromParent(); |
| 240 | const { left, top } = this.offsetFromParent; |
| 241 | const { x, y } = this.getDraggablePosition(); |
| 242 | this.draggable.setState({ |
| 243 | x: x - left, |
| 244 | y: y - top, |
| 245 | }); |
| 246 | // HACK: Apply position adjustment |
| 247 | this.forceUpdate(); |
| 248 | } |
| 249 | |
| 250 | // HACK: To get `react-draggable` state x and y. |
| 251 | getDraggablePosition(): { x: number; y: number } { |
nothing calls this directly
no test coverage detected