I was wondering if it is at all possible to create a draggable viewport in JS. The idea is to have three DIVs layered on top of each other:
- Top layer is a draggable viewport that reveals the bottom-most DIV (image)
- Middle layer is a large image that covers the bottom DIV entirely
- Bottom layer is a large image that is hidden by the middle layer (apart from the bit in the viewport)
I've found many helpful libraries to make a draggable DIV, but am not so sure that it is possible to make it see through the middle layer to reveal the bottom layer.
EDIT: I've uploaded a diagram of what I mean - The viewport looks "through" the middle layer, at the bottom layer - diagram