From da52f1f6850fbd820cc3c70b4609f4cb639861f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 16 Jan 2017 17:48:26 +0100 Subject: [PATCH] Remove Numerical.TOLERANCE --- src/item/Item.js | 4 ++-- src/util/Numerical.js | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/item/Item.js b/src/item/Item.js index 01990d74..1d031b0b 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -1883,8 +1883,8 @@ new function() { // Injection scope for hit-test functions shared with project : this.getGlobalMatrix().prepend(this.getView()._matrix), // Calculate the transformed padding as 2D size that describes the // transformed tolerance circle / ellipse. Make sure it's never 0 - // since we're using it for division. - tolerance = Math.max(options.tolerance, /*#=*/Numerical.TOLERANCE), + // since we're using it for division (see checkBounds()). + tolerance = Math.max(options.tolerance, /*#=*/Numerical.EPSILON), // Hit-tests are performed in the item's local coordinate space. // To calculate the correct 2D padding for tolerance, we therefore // need to apply the inverted item matrix. diff --git a/src/util/Numerical.js b/src/util/Numerical.js index f98caf7d..7c5305ab 100644 --- a/src/util/Numerical.js +++ b/src/util/Numerical.js @@ -112,7 +112,6 @@ var Numerical = new function() { } return /** @lends Numerical */{ - TOLERANCE: 1e-6, /** * A very small absolute value used to check if a value is very close to * zero. The value should be large enough to offset any floating point