mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 05:30:35 +02:00
latedrag functionality was merged into iD.behavior.drag
This commit is contained in:
@@ -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 \
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
<script src='js/lib/d3.typeahead.js'></script>
|
||||
<script src='js/lib/d3.geo.tile.js'></script>
|
||||
<script src='js/lib/d3.size.js'></script>
|
||||
<script src='js/lib/d3.latedrag.js'></script>
|
||||
<script src='js/lib/d3.keybinding.js'></script>
|
||||
<script src='js/lib/d3-compat.js'></script>
|
||||
<script src='js/lib/queue.js'></script>
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
@@ -21,7 +21,6 @@
|
||||
<script src='../js/lib/sha.js'></script>
|
||||
<script src='../js/lib/d3.geo.tile.js'></script>
|
||||
<script src='../js/lib/d3.keybinding.js'></script>
|
||||
<script src='../js/lib/d3.latedrag.js'></script>
|
||||
<script src='../js/lib/d3.size.js'></script>
|
||||
<script src='../js/lib/d3.typeahead.js'></script>
|
||||
<script src='../js/lib/d3.one.js'></script>
|
||||
|
||||
Reference in New Issue
Block a user