I am implementing a container view for a native mobile app that has draggable objects and also allows panning. To drag an object, the user presses and holds until it activates (by highlighting and increasing in size), and then moves the object. However, the container needs to pan while dragging if the touch approaches the edge of the view. There are three questions:
- How close to the edge of a pannable container should panning begin while dragging?
- How should the distance from the edge affect panning velocity (i.e. panning faster when closer to edge)?
- Should these thresholds be absolute in terms of pixels, or relative to the screen/container size (i.e. should they be bigger for a tablet than for a phone)?
I have come up with some ad hoc parameters, but I am afraid that they are far from ideal:
- Start panning at 10% of container size from edge (e.g., left:20px / right:180px for 200-pixel-wide container)
- Velocity = Max Velocity Constant × (10% - distance) / 10%
Has there been any research on parameters for this problem?