From cab097c09c60dfc342eaac2b8d66a3235f2edd96 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 1 Feb 2018 17:27:49 -0800 Subject: [PATCH] Clean up condition for readability --- src/SelectionManager.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SelectionManager.ts b/src/SelectionManager.ts index 33853036..11856a92 100644 --- a/src/SelectionManager.ts +++ b/src/SelectionManager.ts @@ -266,9 +266,9 @@ export class SelectionManager extends EventEmitter implements ISelectionManager return false; } - return (start[1] < coords[1] && end[1] > coords[1]) || - (start[1] === end[1] && start[1] === coords[1] && coords[0] > start[0] && coords[0] < end[0]) || - (start[1] < end[1] && end[1] === coords[1] && coords[0] < end[0]); + return (coords[1] > start[1] && coords[1] < end[1]) || + (start[1] === end[1] && coords[1] === start[1] && coords[0] > start[0] && coords[0] < end[0]) || + (start[1] < end[1] && coords[1] === end[1] && coords[0] < end[0]); } /**