2

I have a react component in which I am trying to implement a jQuery ui resizable. I am pretty new to React.js and although the div does become draggable it does not become resizable.

Here is the code

export default class Element extends AppComponent {

  componentDidMount() {
    // store the node on the `this.node` so we can access elsewhere
    this.node = ReactDOM.findDOMNode(this);

    //make self draggable
    $(this.node).draggable();
    //make self resizable
    $(this.node).resizable({
      handles: "n, e, s, w, ne, nw, se, sw",
      containment: 'parent',
      minHeight: "1px",
      minWidth: "1px",
      start: function(){},
      resize: function(){}
    });

  }

  render(){

    return(
      <div class="element-wrapper" style={this.props.elementStyle}>
      </div>
    );
  }
}
Imraan Khan
  • 345
  • 1
  • 3
  • 9

0 Answers0