Draggable Rectangle

Hi,

I have a rectangle on the stage and would like to scale the rectangle when it is dragged.

When the rectangle is dragged to the right, the width of the rectangle will increase. When the rectangle is dragged to the left, the width of the rectangle will decrease.

Similarly , when the rectangle is dragged upwards, the height of the rectangle will increase. And when the rectangle is dragged downwards, the height of the rectangle will decrease.

The position of the rectangle is fixed.

Would appreciate if someone can help me…

Thanks in advance :slight_smile: