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

Commit

Permalink
Merge pull request #17892 from cctuan/990435
Browse files Browse the repository at this point in the history
Bug 990435 - [tarako] the two homescreens randomly overlapped with each ...
  • Loading branch information
sprd-ffos committed Apr 3, 2014
2 parents 43a76a6 + 5a190c8 commit ab6cbca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/homescreen/js/dock.js
Expand Up @@ -20,6 +20,12 @@ var DockManager = (function() {
var touchmove = isTouch ? 'touchmove' : 'mousemove';
var touchend = isTouch ? 'touchend' : 'mouseup';

document.addEventListener('visibilitychange', function() {
if (document.hidden == false) {
windowWidth = window.innerWidth;
}
});

var getX = (function getXWrapper() {
return isTouch ? function(e) { return e.touches[0].pageX } :
function(e) { return e.pageX };
Expand Down
7 changes: 7 additions & 0 deletions apps/homescreen/js/grid.js
Expand Up @@ -41,6 +41,13 @@ var GridManager = (function() {
var container;

var windowWidth = window.innerWidth;
document.addEventListener('visibilitychange', function() {
if (document.hidden == false) {
windowWidth = window.innerWidth;
DEVICE_HEIGHT = window.innerHeight;
}
});

var swipeThreshold, swipeFriction, tapThreshold;

var dragging = false;
Expand Down

0 comments on commit ab6cbca

Please sign in to comment.