Fix the offset of the drag&select feature in the drive

This commit is contained in:
yflory 2017-05-02 10:41:31 +02:00
parent f414d480a9
commit 092b98d235
1 changed files with 3 additions and 2 deletions

View File

@ -274,11 +274,12 @@ define([
var pos = sel.pos;
var l = $content[0].querySelectorAll('.element:not(.selected):not(.header)');
var p, el;
var offset = getViewMode() === "grid" ? 10 : 0;
for (var i = 0; i < l.length; i++) {
el = l[i];
p = $(el).position();
p.top += 10 + $content.scrollTop();
p.left += 10;
p.top += offset + $content.scrollTop();
p.left += offset;
p.bottom = p.top + $(el).outerHeight();
p.right = p.left + $(el).outerWidth();
if (p.right < pos.left || p.left > pos.right