From 6a4b75aa88573fd80ade1aaf1f92cab8bb06459f Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 21 Dec 2012 12:29:47 -0800 Subject: [PATCH] latedrag functionality was merged into iD.behavior.drag --- Makefile | 1 - index.html | 1 - js/id/modes/browse.js | 1 - js/id/modes/select.js | 1 - js/lib/d3.latedrag.js | 22 ---------------------- test/index.html | 1 - 6 files changed, 27 deletions(-) delete mode 100644 js/lib/d3.latedrag.js diff --git a/Makefile b/Makefile index b6962d37b..b002d40f4 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,6 @@ all: \ js/lib/d3.v3.js \ js/lib/d3.geo.tile.js \ js/lib/d3.keybinding.js \ - js/lib/d3.latedrag.js \ js/lib/d3.one.js \ js/lib/d3.size.js \ js/lib/d3.typeahead.js \ diff --git a/index.html b/index.html index 57ccc56f4..6b71d0fdb 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,6 @@ - diff --git a/js/id/modes/browse.js b/js/id/modes/browse.js index 90d1ee16b..69c1982eb 100644 --- a/js/id/modes/browse.js +++ b/js/id/modes/browse.js @@ -36,7 +36,6 @@ iD.modes.Browse = function() { behavior.off(surface); }); - surface.on('mousedown.latedrag', null); surface.on('click.browse', null); d3.select('#map').attr('class', null); }; diff --git a/js/id/modes/select.js b/js/id/modes/select.js index b03482777..e91c0d4a8 100644 --- a/js/id/modes/select.js +++ b/js/id/modes/select.js @@ -94,7 +94,6 @@ iD.modes.Select = function (entity) { }); surface.on("click.browse", null); - surface.on('mousedown.latedrag', null); mode.map.keybinding().on('⌫.browse', null); mode.map.selection(null); }; diff --git a/js/lib/d3.latedrag.js b/js/lib/d3.latedrag.js deleted file mode 100644 index 6ef3edd1e..000000000 --- a/js/lib/d3.latedrag.js +++ /dev/null @@ -1,22 +0,0 @@ -d3.latedrag = function() { - var filter = d3.functor(true); - - function latedrag(selection) { - var mousedown = selection.on('mousedown.drag'); - selection.on('mousedown.drag', null); - selection.on('mousedown.latedrag', function() { - var datum = d3.select(d3.event.target).datum(); - if (datum && filter(datum)) { - mousedown.apply(selection.node(), [datum]); - } - }); - } - - latedrag.filter = function(_) { - if (!arguments.length) return filter; - filter = _; - return latedrag; - }; - - return latedrag; -}; diff --git a/test/index.html b/test/index.html index d08ea2158..a9887a49e 100644 --- a/test/index.html +++ b/test/index.html @@ -21,7 +21,6 @@ -