From 0df32f6a4dba5c6405ab2217a4a7078f107a2410 Mon Sep 17 00:00:00 2001 From: Franc Camps-Febrer Date: Wed, 9 Jan 2019 17:09:53 +0100 Subject: [PATCH] Avoid transition end event trigger multiple times --- src/components/Map.jsx | 2 +- src/components/Timeline.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Map.jsx b/src/components/Map.jsx index 14f3fd2..8b0dd40 100644 --- a/src/components/Map.jsx +++ b/src/components/Map.jsx @@ -251,7 +251,7 @@ function mapStateToProps(state) { selected: state.app.selected, highlighted: state.app.highlighted, mapAnchor: state.app.mapAnchor, - mapBounds: state.app.filters.mapBounds + mapBounds: state.app.filters.mapBounds, narrative: state.app.narrative, flags: { isShowingSites: state.app.flags.isShowingSites diff --git a/src/components/Timeline.jsx b/src/components/Timeline.jsx index e912529..535fa27 100644 --- a/src/components/Timeline.jsx +++ b/src/components/Timeline.jsx @@ -71,7 +71,7 @@ class Timeline extends React.Component { let element = document.querySelector('.timeline-wrapper'); element.addEventListener("transitionend", (event) => { this.computeDims(); - }, false); + }, { once: true }); }