From 3576a99eb5d4354160591359323165ea8255bde0 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Tue, 5 Feb 2013 11:00:13 -0500 Subject: [PATCH] Always have delete as first op --- js/id/modes/select.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/id/modes/select.js b/js/id/modes/select.js index ec6017ae3..126e01029 100644 --- a/js/id/modes/select.js +++ b/js/id/modes/select.js @@ -38,9 +38,10 @@ iD.modes.Select = function(context, selection, initial) { context.install(behavior); }); - var operations = d3.values(iD.operations) + var operations = _.without(d3.values(iD.operations), iD.operations.Delete) .map(function(o) { return o(selection, context); }) .filter(function(o) { return o.available(); }); + operations.unshift(iD.operations.Delete(selection, context)); operations.forEach(function(operation) { keybinding.on(operation.key, function() {