From ad629b2e11f1702a18c8ca32114cf6cdfb27bf66 Mon Sep 17 00:00:00 2001 From: Saman Bemel-Benrud Date: Tue, 21 May 2013 14:04:14 -0400 Subject: [PATCH] Smoother transition for translate block/ --- js/id/ui/preset/localized.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/js/id/ui/preset/localized.js b/js/id/ui/preset/localized.js index 5a28bd8e0..224254f75 100644 --- a/js/id/ui/preset/localized.js +++ b/js/id/ui/preset/localized.js @@ -126,8 +126,12 @@ iD.ui.preset.localized = function(field, context) { t[key(d.lang)] = ''; event.change(t); d3.select(this.parentNode) + .style('top','0') + .style('max-height','240px') + .style('overflow','hidden') .transition() .style('opacity', '0') + .style('max-height','0px') .remove(); }) .append('span').attr('class', 'icon delete'); @@ -153,9 +157,13 @@ iD.ui.preset.localized = function(field, context) { });; wraps.exit() - .style('opacity', '1') + .style('top','0') + .style('overflow','hidden') + .style('max-height','240px') .transition() + .style('max-height','0') .style('opacity', '0') + .style('top','-10px') .remove(); selection.selectAll('.entry').select('.localized-lang').property('value', function(d) {