From 81910d4f276a4b4132d626ec5e29f10dfdda77c5 Mon Sep 17 00:00:00 2001 From: ajlomagno Date: Tue, 26 Dec 2017 15:12:11 -0500 Subject: [PATCH 1/2] Fixed click counter persisting --- modules/ui/curtain.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/ui/curtain.js b/modules/ui/curtain.js index ba671bfdd..7e08341d2 100644 --- a/modules/ui/curtain.js +++ b/modules/ui/curtain.js @@ -221,6 +221,9 @@ export function uiCurtain() { } curtain.cut(box, options.duration); + + //remove any leftover .counter elements + tooltip.selectAll('.counter').remove(); return tooltip; }; From 5d3df2596066fbfe60897589aa5ba24af0b30033 Mon Sep 17 00:00:00 2001 From: ajlomagno Date: Wed, 27 Dec 2017 13:19:22 -0500 Subject: [PATCH 2/2] Moved cleanuo code to exit function in welcome.js --- modules/ui/curtain.js | 3 --- modules/ui/intro/welcome.js | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/ui/curtain.js b/modules/ui/curtain.js index 7e08341d2..ba671bfdd 100644 --- a/modules/ui/curtain.js +++ b/modules/ui/curtain.js @@ -221,9 +221,6 @@ export function uiCurtain() { } curtain.cut(box, options.duration); - - //remove any leftover .counter elements - tooltip.selectAll('.counter').remove(); return tooltip; }; diff --git a/modules/ui/intro/welcome.js b/modules/ui/intro/welcome.js index f54c81bc4..8187998e7 100644 --- a/modules/ui/intro/welcome.js +++ b/modules/ui/intro/welcome.js @@ -137,7 +137,7 @@ export function uiIntroWelcome(context, reveal) { ); } - + chapter.enter = function() { welcome(); }; @@ -145,6 +145,9 @@ export function uiIntroWelcome(context, reveal) { chapter.exit = function() { listener.off(); + var tooltip = d3_select('.curtain-tooltip.intro-mouse') + .selectAll('.counter') + .remove(); };