diff --git a/.gitignore b/.gitignore index a3e11540..5f98ac3d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ package-lock.json */**/package-lock.json yarn-error.log .DS_Store + +.idea diff --git a/CHANGELOG.md b/CHANGELOG.md index a85a9118..c85b141e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ # Version 4.0.0 +## 4.0.15 (Mar 12, 2019) + +- Fix: popup close button click event propagates to map (#751) + ## 4.0.14 (Mar 4, 2019) - Fix static context bug (#749) diff --git a/package.json b/package.json index 0509c645..ec11de31 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-map-gl", "description": "A React wrapper for MapboxGL-js and overlay API.", - "version": "4.0.14", + "version": "4.0.15", "keywords": [ "mapbox", "mapbox-gl", diff --git a/test/src/utils/transition-manager.spec.js b/test/src/utils/transition-manager.spec.js index 4e360e08..8f512be5 100644 --- a/test/src/utils/transition-manager.spec.js +++ b/test/src/utils/transition-manager.spec.js @@ -268,7 +268,7 @@ const TEST_CASES_EVENTS = [ function compareFunc(func1, func2, step){ for(let i = 0; i <= 1; i += step){ - if(!equals(func1(i), func2(i))) return false; + if(!equals(func1(i), func2(i), 1e-7)) return false; } return true; } @@ -292,7 +292,7 @@ test('TransitionManager#TRANSITION_EVENTS', t => { // testing duration const testDuration = mode === TRANSITION_EVENTS.UPDATE ? testCase.input[ti].transitionDuration - (time[1] - time[0]) : testCase.input[ti].transitionDuration; - t.is(equals(transitionManager.state.duration, testDuration), testCase.shouldChange[mode].transitionDuration, 'transitionDuration match'); + t.is(equals(transitionManager.state.duration, testDuration, 1e-7), testCase.shouldChange[mode].transitionDuration, 'transitionDuration match'); // testing easing function let testEasingFunc = testCase.input[ti].transitionEasing; diff --git a/test/test-utils.js b/test/test-utils.js index 14e015c2..fc9039ce 100644 --- a/test/test-utils.js +++ b/test/test-utils.js @@ -25,6 +25,6 @@ export function isSameLocation(lngLat1, lngLat2) { return ((lng1 - lng2) % 360) === 0 && lat1 === lat2; } -export function equals(a, b) { - return Math.abs(a - b) < EPSILON; +export function equals(a, b, epsilon = EPSILON) { + return Math.abs(a - b) < epsilon; }