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

Commit

Permalink
Bug 985460 - [Home2] Drag/drop heuristic improvements r=me
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinGrandon committed Apr 24, 2014
1 parent ada7d3d commit 1935f42
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions dev_apps/home2/js/dragdrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(function(exports) {

const activateDelay = 600;
const activateDelay = 400;

const activeScaleAdjust = 0.4;

Expand Down Expand Up @@ -99,13 +99,16 @@

/**
* Positions an icon on the grid.
* @param {Integer} pageX
* @param {Integer} posY
* @param {Integer} pageX The X coordinate of the touch.
* @param {Integer} pageY The Y coordinate of the touch.
*/
positionIcon: function(pageX, pageY) {
pageX = pageX - this.xAdjust;
pageY = pageY - this.xAdjust;

this.icon.transform(
pageX - this.xAdjust,
pageY - this.yAdjust,
pageX,
pageY,
this.icon.scale + activeScaleAdjust);

// Reposition in the icons array if necessary.
Expand Down

0 comments on commit 1935f42

Please sign in to comment.