diff --git a/js/id/ui/preset_grid.js b/js/id/ui/preset_grid.js index 530e802a7..f3bd3f211 100644 --- a/js/id/ui/preset_grid.js +++ b/js/id/ui/preset_grid.js @@ -60,22 +60,6 @@ iD.ui.PresetGrid = function(context) { .call(drawButtons); } - function choose(d) { - // Category - if (d.members) { - search.property('value', ''); - presets = d.members; - drawGrid(selection, presets); - - // Preset - } else { - context.presets().choose(d); - event.choose(d); - } - } - - function name(d) { return d.name; } - function drawGrid(selection, presets) { var entries = selection @@ -161,7 +145,24 @@ iD.ui.PresetGrid = function(context) { entries.exit().remove(); entries.order(); - } + + function choose(d) { + // Category + if (d.members) { + search.property('value', ''); + presets = d.members; + drawGrid(selection, presets); + + // Preset + } else { + context.presets().choose(d); + event.choose(d); + } + } + + function name(d) { return d.name; } + + } } function cancel() {