From c3c71ca9513c43d748be4d89f3f064c843d2b177 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sun, 2 Jul 2017 17:34:49 +0200 Subject: [PATCH] Update dimsFromTarget method --- src/utils/Sorter.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/utils/Sorter.js b/src/utils/Sorter.js index a3c7c07c2..90e9db403 100644 --- a/src/utils/Sorter.js +++ b/src/utils/Sorter.js @@ -530,8 +530,11 @@ module.exports = Backbone.View.extend({ // to borders, so have to to check always if(this.nearBorders(this.prevTargetDim, rX, rY) || (!this.nested && !this.cacheDims.length)) { - dims = this.cacheDimsP; - this.target = this.targetP; + if (!this.validTarget(this.targetP).valid) { + return this.dimsFromTarget(this.targetP, rX, rY); + } + dims = this.cacheDimsP; + this.target = this.targetP; } this.lastPos = null;