From 1c871b88a381d6ed7e8d96edf4ca959384dad3ea Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 15 Apr 2016 10:53:34 -0400 Subject: [PATCH] Fix indent and remove extra opacity transition --- js/id/ui/commit.js | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/js/id/ui/commit.js b/js/id/ui/commit.js index 2c31e79b0..d98627ff5 100644 --- a/js/id/ui/commit.js +++ b/js/id/ui/commit.js @@ -52,19 +52,21 @@ iD.ui.Commit = function(context) { } function detectForClippy() { - var googleWarning = clippyArea - .html('') - .selectAll('a') - .data(this.value.match(/google/i) ? [true] : []); + var googleWarning = clippyArea + .html('') + .selectAll('a') + .data(this.value.match(/google/i) ? [true] : []); + googleWarning.exit().remove(); + googleWarning.enter() - .append('a') - .attr('target', '_blank') - .attr('tabindex', -1) - .call(iD.svg.Icon('#icon-alert', 'inline')) - .attr('href', t('commit.google_warning_link')) - .append('span') - .text(t('commit.google_warning')); + .append('a') + .attr('target', '_blank') + .attr('tabindex', -1) + .call(iD.svg.Icon('#icon-alert', 'inline')) + .attr('href', t('commit.google_warning_link')) + .append('span') + .text(t('commit.google_warning')); } commentField.node().select(); @@ -94,12 +96,12 @@ iD.ui.Commit = function(context) { .attr('class', 'changeset-info'); changeSetInfo.append('a') - .attr('target', '_blank') - .attr('tabindex', -1) - .call(iD.svg.Icon('#icon-out-link', 'inline')) - .attr('href', t('commit.about_changeset_comments_link')) - .append('span') - .text(t('commit.about_changeset_comments')); + .attr('target', '_blank') + .attr('tabindex', -1) + .call(iD.svg.Icon('#icon-out-link', 'inline')) + .attr('href', t('commit.about_changeset_comments_link')) + .append('span') + .text(t('commit.about_changeset_comments')); // Warnings var warnings = body.selectAll('div.warning-section') @@ -248,9 +250,6 @@ iD.ui.Commit = function(context) { .transition() .style('opacity', 1); - li.style('opacity', 0) - .transition() - .style('opacity', 1); function mouseover(d) { if (d.entity) {