Including a DIV in the click and drag preview window

Does anyone know an unobtrusive, prototype or not framework based on turning a DIV with a lot of content (like a map) into an interactive and draggable “map” container with fixed dimensions, very similar to Google Maps?

I want to display HTML fragments in a large input form. These pieces can exceed the available space (each piece can have a viewport of about 150x300 pixels in size). The click and drag solution is perfect for navigating through them. I could use overflow: auto, of course, but this is not a convenient way to travel in this case.

+2
source share
3 answers

Take a look at the following:

http://www.switchonthecode.com/tutorials/javascript-tutorial-draggable-view-in-a-container

He can point you in the right direction, at least

+3
source

Are you after something like jQuery portlets?

+1
source

I am making one for a touch screen kiosk. This is due to moving a large map based on the fact that someone is dragging a viewport on a minimap with different zoom levels.

Take a look:

http://www.mintohomes.com/morgansgrantkiosk/SitePlan/Default.asp

The JavaScript source is located on the page.

0
source

Source: https://habr.com/ru/post/1308231/


All Articles