Skip to content

Resizable and Draggable #2

@andrewgleave

Description

@andrewgleave

Is it possible to have an element be resizable and generally resizable as well? i.e the width and height can be changed as in the demo, but the element also dragged around?

<ResizableBox
  className={ this.props.className }
  draggableOpts={{
    start: { x: this.props.frame.x, y: this.props.frame.y },

    grid: [25, 25],
    onStop: this.handleDragStop
  }}
  width={ this.props.frame.w }
  height={ this.props.frame.h === 'auto' ? 100 : this.props.frame.h }
  minConstraints={[100, 100]}>
    <span>Some markup</span>
</ResizableBox>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions