From 29eddc15eba65d6166b35dadf70d5600417262f4 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 26 Mar 2013 11:50:00 -0700 Subject: [PATCH] Fix up tag reference transition --- js/id/ui/preset.js | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/js/id/ui/preset.js b/js/id/ui/preset.js index 308005835..ada60e346 100644 --- a/js/id/ui/preset.js +++ b/js/id/ui/preset.js @@ -150,24 +150,23 @@ iD.ui.preset = function(context, entity, preset) { .each(function(field) { if (field.showingReference) { d3.select(this) - .call(iD.ui.TagReference(entity, {key: field.key})) - .style('max-height', '0px') - .style('padding-top', '0px') - .style('opacity', '0') - .transition() - .duration(200) - .style('padding-top', '20px') - .style('max-height', '200px') - .style('opacity', '1'); - } else { - d3.select(this) - .call(iD.ui.TagReference(entity, {key: field.key})) - .transition() - .duration(200) - .style('max-height', '0px') - .style('padding-top', '0px') - .style('opacity', '0'); - } + .call(iD.ui.TagReference(entity, {key: field.key})) + .style('max-height', '0px') + .style('padding-top', '0px') + .style('opacity', '0') + .transition() + .duration(200) + .style('padding-top', '20px') + .style('max-height', '200px') + .style('opacity', '1'); + } else { + d3.select(this) + .transition() + .duration(200) + .style('max-height', '0px') + .style('padding-top', '0px') + .style('opacity', '0'); + } }); selection.exit()