mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-05 22:46:38 +02:00
transition search results in, not out
This commit is contained in:
@@ -186,13 +186,7 @@ iD.ui.PresetGrid = function(context, entity) {
|
||||
.selectAll('div.grid-entry-wrap')
|
||||
.data(function(d) { return d.slice(0, limit); }, name);
|
||||
|
||||
entries.exit()
|
||||
.style('opacity', 1)
|
||||
.transition()
|
||||
.style('opacity', 0)
|
||||
.each('end', function() {
|
||||
d3.select(this).remove();
|
||||
});
|
||||
entries.exit().remove();
|
||||
|
||||
var entered = entries.enter()
|
||||
.append('div')
|
||||
@@ -201,6 +195,10 @@ iD.ui.PresetGrid = function(context, entity) {
|
||||
.attr('class', 'grid-entry')
|
||||
.on('click', choose);
|
||||
|
||||
entered.style('opacity', 0)
|
||||
.transition()
|
||||
.style('opacity', 1);
|
||||
|
||||
entered.append('div')
|
||||
.attr('class', presetClass);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user