Plotly's editable shape

I want to implement the use case that allows me to resize and drag a shape only in two directions (to left or to right).

I see that there are multiple values for dragMode available: ‘move’, ‘s’, ‘sw’, ‘w’, ‘se’, ‘e’, ‘ne’, ‘n’, ‘nw’ and ‘w’. It would be great if I could somehow disable ‘move’, ‘s’, ‘sw’, ‘se’, ‘ne’, ‘n’, ‘nw’.

So far, I have the following: https://codepen.io/anon/pen/jKaXRQ

And do you know if there are some events to detect that the shape is being dragged or resized?

Any help, much appreciated.

We don’t offer that level of customization at the moment unfortunately.

It would be a nice addition to the library though.