I got the compiler to take it, and seems to be functioning. However, two undesirable things happen when I implement the DragZoomingTool in the toolManager. Added:
.insertAt(2, new DragZoomingTool()
It shows the bounding box when I click-drag (without long press, then drag). How can I disable that, I just want the behavior of the map moving
Second, sub part 1:
If I do the proper select-drag (click, pause, drag), and select an area…the geometry is zoomed in but the map stays unzoomed. Any ideas why this might be the case?
Second, sub part 2:
When it does zoom, it magnifies all geometry (# of pixels increases in width, radii, etc). In a graph over mapping use case, I’d want the scale of the geometry to remain, but just being “stretched apart” as I get closer.
OK, so you need to change the behavior of the DragZoomingTool. Maybe you do want to copy the code to your own directory.
The “bounding box” is the DragZoomingTool.box. If you don’t want it, change the code not to create it, add it to the Diagram, position and size it, and later remove it from the Diagram.
You can see what DragZoomingTool.doMouseUp does: it calls DragZoomingTool.zoomToRect. You’ll want to change that method not to just set the Diagram.scale but to change the zoom level and center point of your map.
When I use the DragZoom tool it scales all lines and nodes, I don’t want it to do that even if I do get it to zoom the map in custom code.
If I double click on the map (which I believe is the native Leaflet zoom handler), the map zooms great, the geometry is left the same pixel width, and everything is still in synch. When I attempt zoom using the drag zooming tool, the lines become thick and circle nodes large, not what I want.
So my question is, is it possible to just allow Leaflet to handle the native zoom to bounds (shift-drag)? That’s how I had my map originally zooming before layering GoJS on top.