I want to allow the user to drag shapes in Plotly, but restrict this to horizontal movement only. Therefore, I am using d3.js for the drag behavior. Everything works nicely