I need to move my viewport, if user drag element outside of it. offsetX and offsetY is not help here. How to solve this? I try to do it in many ways, but dont have any working examples.
Simple example: When i drag red rect out from view (to the top left corner for example) I want my view moved with it.
codepen.io/dimabytes/pen/WNNORyZ