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

Commit 1d745fe

Browse files
author
Scott Jehl
committed
fixed a bug in the return value of toss. All tests are now passing
1 parent 5853220 commit 1d745fe

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

dist/overthrow.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@
6060
w.overthrow.enabledClassName = enabledClassName;
6161

6262
w.overthrow.addClass = function(){
63-
if( docElem.className.indexOf( enabledClassName ) === -1 ){
64-
docElem.className += " " + enabledClassName;
63+
if( docElem.className.indexOf( w.overthrow.enabledClassName ) === -1 ){
64+
docElem.className += " " + w.overthrow.enabledClassName;
6565
}
6666
};
6767

6868
w.overthrow.removeClass = function(){
69-
docElem.className = docElem.className.replace( enabledClassName, "" );
69+
docElem.className = docElem.className.replace( w.overthrow.enabledClassName, "" );
7070
};
7171

7272
// Enable and potentially polyfill overflow
@@ -155,13 +155,14 @@
155155
op.left = op.left - sLeft;
156156
}
157157
// Then the top val
158-
if( typeof o.top === "string" ){
158+
if( typeof op.top === "string" ){
159+
159160
op.top = parseFloat( op.top );
160161
endTop = op.top + sTop;
161162
}
162163
else {
163164
endTop = op.top;
164-
o.top = op.top - sTop;
165+
op.top = op.top - sTop;
165166
}
166167

167168
o.intercept();

dist/overthrow.sidescroller.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@
6060
w.overthrow.enabledClassName = enabledClassName;
6161

6262
w.overthrow.addClass = function(){
63-
if( docElem.className.indexOf( enabledClassName ) === -1 ){
64-
docElem.className += " " + enabledClassName;
63+
if( docElem.className.indexOf( w.overthrow.enabledClassName ) === -1 ){
64+
docElem.className += " " + w.overthrow.enabledClassName;
6565
}
6666
};
6767

6868
w.overthrow.removeClass = function(){
69-
docElem.className = docElem.className.replace( enabledClassName, "" );
69+
docElem.className = docElem.className.replace( w.overthrow.enabledClassName, "" );
7070
};
7171

7272
// Enable and potentially polyfill overflow
@@ -155,13 +155,14 @@
155155
op.left = op.left - sLeft;
156156
}
157157
// Then the top val
158-
if( typeof o.top === "string" ){
158+
if( typeof op.top === "string" ){
159+
159160
op.top = parseFloat( op.top );
160161
endTop = op.top + sTop;
161162
}
162163
else {
163164
endTop = op.top;
164-
o.top = op.top - sTop;
165+
op.top = op.top - sTop;
165166
}
166167

167168
o.intercept();

src/overthrow-toss.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,14 @@
5959
op.left = op.left - sLeft;
6060
}
6161
// Then the top val
62-
if( typeof o.top === "string" ){
62+
if( typeof op.top === "string" ){
63+
6364
op.top = parseFloat( op.top );
6465
endTop = op.top + sTop;
6566
}
6667
else {
6768
endTop = op.top;
68-
o.top = op.top - sTop;
69+
op.top = op.top - sTop;
6970
}
7071

7172
o.intercept();

0 commit comments

Comments
 (0)