From e508511ab5686378b5a59ba25033608f05b6f8d3 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Thu, 3 Jun 2021 16:06:15 +1000 Subject: [PATCH] Add check for vertical in token drag map bounds --- src/helpers/token.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/helpers/token.js b/src/helpers/token.js index 1cf083c..5c8a137 100644 --- a/src/helpers/token.js +++ b/src/helpers/token.js @@ -124,7 +124,10 @@ export function clientPositionToMapPosition( // Check map bounds if ( checkMapBounds && - (clientPosition.x < mapRect.left || clientPosition.x > mapRect.right) + (clientPosition.x < mapRect.left || + clientPosition.x > mapRect.right || + clientPosition.y < mapRect.top || + clientPosition.y > mapRect.bottom) ) { return; }