Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This adds an 'infinite drag' feature to the image viewer, 3D viewer and graph editor similar to that of Blender. This makes it much easier and quicker to drag the view around.
Implementation remarks
When the 3D view is being rotated, the rate at which it rotates relative to the amount the mouse is moving slows and eventually stops the further it is dragged, this behaviour happened before but it was not as noticeable because the drags were limited by the size of the screen. The way the drags going off the widget are handled is the cursor is moved to the opposite side and an offset is applied in order to compensate, as there is no way to stop the drag AFAIK. An alternative implementation that would be easier to handle but maybe less visually responsive is to hide the cursor and keep it in the same place while it is being dragged.