From 5d3df2596066fbfe60897589aa5ba24af0b30033 Mon Sep 17 00:00:00 2001 From: ajlomagno Date: Wed, 27 Dec 2017 13:19:22 -0500 Subject: [PATCH] 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(); };