Skip to content

Instantly share code, notes, and snippets.

leafletMap.dragging.disable();
leafletMap.touchZoom.disable();
leafletMap.doubleClickZoom.disable();
leafletMap.scrollWheelZoom.disable();
leafletMap.boxZoom.disable();
leafletMap.keyboard.disable();
if (leafletMap.tap) leafletMap.tap.disable();
document.getElementById('mapid').style.cursor = 'default';
@mattsrinc
mattsrinc / .block
Last active December 4, 2018 17:46
dc.js example
license: mit
@mattsrinc
mattsrinc / README.md
Last active February 17, 2020 14:31
D3.js Drag and Drop Collapsible Tree with Node Editing
@mattsrinc
mattsrinc / README.md
Created February 25, 2016 01:53
D3.js Drag and Drop, Zoomable, Panning, Collapsible Tree with auto-sizing.

This example pulls together various examples of work with trees in D3.js.

The panning functionality can certainly be improved in my opinion and I would be thrilled to see better solutions contributed.

One can do all manner of housekeeping or server related calls on the drop event to manage a remote tree dataset for example.

Dragging can be performed on any node other than root (flare). Dropping can be done on any node.

Panning can either be done by dragging an empty part of the SVG around or dragging a node towards an edge.