Moving and drawing shapes in the same graph

I wanted to create an app where both drawing/deleting rectangles and moving drawn rectangles trigger a callback. I have set the dragmode to ‘drawRect’ which makes the relayoutData respond to deletion and creation but moving the boxes doesn’t trigger it. Can someone please let me know if there is a way around to trigger moving shapes also for a callback.