Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' of github.com:xtk/X
  • Loading branch information
Daniel Haehn committed Aug 16, 2013
2 parents 9084ab0 + c9f70be commit 3cab02b
Show file tree
Hide file tree
Showing 16 changed files with 1,807 additions and 1,284 deletions.
12 changes: 10 additions & 2 deletions injects/displayable.js
Expand Up @@ -412,7 +412,11 @@ X.displayable.prototype.__defineSetter__('opacity', function(opacity) {

for (c = 0; c < numberOfChildren; c++) {

children[c]['opacity'] = opacity;
if(goog.isDefAndNotNull(children[c])) {

children[c]['opacity'] = opacity;

}

}

Expand Down Expand Up @@ -483,7 +487,11 @@ X.displayable.prototype.__defineSetter__('visible', function(visible) {

for (c = 0; c < numberOfChildren; c++) {

children[c]['visible'] = visible;
if(goog.isDefAndNotNull(children[c])) {

children[c]['visible'] = visible;

}

}

Expand Down
33 changes: 6 additions & 27 deletions io/interactor.js
Expand Up @@ -1002,16 +1002,16 @@ X.interactor.prototype.onMouseMovementInside_ = function(event) {
}

// threshold the distance to avoid 'irregular' movement
if (Math.abs(distance.x) < 2) {
// if (Math.abs(distance.x) < 2) {

distance.x = 0;
// distance.x = 0;

}
if (Math.abs(distance.y) < 2) {
// }
// if (Math.abs(distance.y) < 2) {

distance.y = 0;
// distance.y = 0;

}
// }

// jump out if the distance is 0 to avoid unnecessary events
if (distance.magnitude() == 0) {
Expand Down Expand Up @@ -1050,27 +1050,6 @@ X.interactor.prototype.onMouseMovementInside_ = function(event) {
// create a new pan event
var e = new X.event.PanEvent();

// panning in general moves pretty fast, so we threshold the distance
// additionally
if (distance.x > 5) {

distance.x = 5;

} else if (distance.x < -5) {

distance.x = -5;

}
if (distance.y > 5) {

distance.y = 5;

} else if (distance.y < -5) {

distance.y = -5;

}

// attach the distance vector
e._distance = distance;

Expand Down

0 comments on commit 3cab02b

Please sign in to comment.