Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
fixed a bug in the return value of toss. All tests are now passing
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Jehl committed Aug 2, 2013
1 parent 5853220 commit 1d745fe
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
11 changes: 6 additions & 5 deletions dist/overthrow.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@
w.overthrow.enabledClassName = enabledClassName;

w.overthrow.addClass = function(){
if( docElem.className.indexOf( enabledClassName ) === -1 ){
docElem.className += " " + enabledClassName;
if( docElem.className.indexOf( w.overthrow.enabledClassName ) === -1 ){
docElem.className += " " + w.overthrow.enabledClassName;
}
};

w.overthrow.removeClass = function(){
docElem.className = docElem.className.replace( enabledClassName, "" );
docElem.className = docElem.className.replace( w.overthrow.enabledClassName, "" );
};

// Enable and potentially polyfill overflow
Expand Down Expand Up @@ -155,13 +155,14 @@
op.left = op.left - sLeft;
}
// Then the top val
if( typeof o.top === "string" ){
if( typeof op.top === "string" ){

op.top = parseFloat( op.top );
endTop = op.top + sTop;
}
else {
endTop = op.top;
o.top = op.top - sTop;
op.top = op.top - sTop;
}

o.intercept();
Expand Down
11 changes: 6 additions & 5 deletions dist/overthrow.sidescroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@
w.overthrow.enabledClassName = enabledClassName;

w.overthrow.addClass = function(){
if( docElem.className.indexOf( enabledClassName ) === -1 ){
docElem.className += " " + enabledClassName;
if( docElem.className.indexOf( w.overthrow.enabledClassName ) === -1 ){
docElem.className += " " + w.overthrow.enabledClassName;
}
};

w.overthrow.removeClass = function(){
docElem.className = docElem.className.replace( enabledClassName, "" );
docElem.className = docElem.className.replace( w.overthrow.enabledClassName, "" );
};

// Enable and potentially polyfill overflow
Expand Down Expand Up @@ -155,13 +155,14 @@
op.left = op.left - sLeft;
}
// Then the top val
if( typeof o.top === "string" ){
if( typeof op.top === "string" ){

op.top = parseFloat( op.top );
endTop = op.top + sTop;
}
else {
endTop = op.top;
o.top = op.top - sTop;
op.top = op.top - sTop;
}

o.intercept();
Expand Down
5 changes: 3 additions & 2 deletions src/overthrow-toss.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,14 @@
op.left = op.left - sLeft;
}
// Then the top val
if( typeof o.top === "string" ){
if( typeof op.top === "string" ){

op.top = parseFloat( op.top );
endTop = op.top + sTop;
}
else {
endTop = op.top;
o.top = op.top - sTop;
op.top = op.top - sTop;
}

o.intercept();
Expand Down

0 comments on commit 1d745fe

Please sign in to comment.