Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Allow the user to drag faster #7820

Merged
merged 2 commits into from
Aug 6, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions src/project/WorkingSetView.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ define(function (require, exports, module) {
interval = false,
moved = false;

// Don't redraw the working set for the next events
_suppressSortRedraw = true;

function drag(e) {
var top = e.pageY - startPageY;

Expand Down Expand Up @@ -301,9 +304,6 @@ define(function (require, exports, module) {
if (!moved && Math.abs(top) > 3) {
Menus.closeAll();
moved = true;

// Don't redraw the working set for the next events
_suppressSortRedraw = true;
}
}

Expand Down Expand Up @@ -374,10 +374,10 @@ define(function (require, exports, module) {
if (addBottomShadow) {
ViewUtils.addScrollerShadow($openFilesContainer[0], null, true);
}

// The drag is done, so set back to the default
_suppressSortRedraw = false;
}

// The drag is done, so set back to the default
_suppressSortRedraw = false;
}


Expand All @@ -395,16 +395,17 @@ define(function (require, exports, module) {

// Style the element
$listItem.css("position", "relative").css("z-index", 1);

// Envent Handlers
$openFilesContainer.on("mousemove.workingSet", function (e) {
var $holder = $(window);
$holder.on("mousemove.workingSet", function (e) {
if (hasScroll) {
scroll(e);
}
drag(e);
});
$openFilesContainer.on("mouseup.workingSet mouseleave.workingSet", function (e) {
$openFilesContainer.off("mousemove.workingSet mouseup.workingSet mouseleave.workingSet");
$holder.on("mouseup.workingSet", function (e) {
$holder.off(".workingSet");
drop();
});
}
Expand Down