Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Commit a6a7541

Browse files
Fixing animation issues
1 parent 7c68c30 commit a6a7541

File tree

6 files changed

+32
-31
lines changed

6 files changed

+32
-31
lines changed

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "Rx-jQuery",
3-
"version": "1.1.4",
2+
"name": "rxjs-jquery",
3+
"version": "1.1.5",
44
"main": "rx.jquery.js",
55
"dependencies": {
66
"rxjs": "*"

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"name": "rx-jquery",
33
"title": "Reactive Extensions for JavaScript bindings for jQuery",
44
"description": "Library for composing asynchronous and event-based operations in JavaScript extending the jQuery library",
5-
"version": "1.1.4",
6-
"homepage": "https://github.com/Reactive-Extensions/rxjs-jquery",
5+
"version": "1.1.5",
6+
"homepage": "https://github.com/Reactive-Extensions/RxJS-jQuery",
77
"author": {
88
"name": "MS Open Tech",
9-
"url": "https://github.com/Reactive-Extensions/rxjs-jquery/blob/master/authors.txt"
9+
"url": "https://github.com/Reactive-Extensions/RxJS-jQuery/blob/master/authors.txt"
1010
},
1111
"repository": {
1212
"type": "git",
13-
"url": "https://github.com/Reactive-Extensions/rxjs-jquery.git"
13+
"url": "https://github.com/Reactive-Extensions/RxJS-jQuery.git"
1414
},
1515
"licenses": [
1616
{

rx.jquery.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@
434434
parent.ready(handler);
435435
});
436436
};
437-
function handeAnimation(jQueryProto, method, args) {
437+
function handleAnimation(jQueryProto, method, args) {
438438
var options = args[0];
439439

440440
// Check for duration
@@ -452,7 +452,7 @@
452452
var subject = new AsyncSubject();
453453

454454
options.complete = function() {
455-
subject.onNext(this);
455+
subject.onNext(jQueryProto);
456456
subject.onCompleted();
457457
};
458458

@@ -475,7 +475,7 @@
475475
* @returns {Observable} An Observable sequence which wraps the jQuery hide method.
476476
*/
477477
proto.hideAsObservable = function (options) {
478-
return handeAnimation(this, 'hide', arguments);
478+
return handleAnimation(this, 'hide', arguments);
479479
};
480480

481481
/**
@@ -492,7 +492,7 @@
492492
* @returns {Observable} An Observable sequence which wraps the jQuery show method.
493493
*/
494494
proto.showAsObservable = function(options) {
495-
return handeAnimation(this, 'show', arguments);
495+
return handleAnimation(this, 'show', arguments);
496496
};
497497

498498
/**
@@ -548,7 +548,7 @@
548548
* @returns {Observable} An Observable sequence which wraps the jQuery fadeIn method.
549549
*/
550550
proto.fadeInAsObservable = function(options) {
551-
return handeAnimation(this, 'fadeIn', arguments);
551+
return handleAnimation(this, 'fadeIn', arguments);
552552
};
553553

554554
/**
@@ -563,7 +563,7 @@
563563
var subject = new AsyncSubject();
564564

565565
this.fadeTo(duration, opacity, easing, function() {
566-
subject.onNext(this);
566+
subject.onNext(proto);
567567
subject.onCompleted();
568568
});
569569

@@ -584,7 +584,7 @@
584584
* @returns {Observable} An Observable sequence which wraps the jQuery fadeOut method.
585585
*/
586586
proto.fadeOutAsObservable = function(options) {
587-
return handeAnimation(this, 'fadeOut', arguments);
587+
return handleAnimation(this, 'fadeOut', arguments);
588588
};
589589

590590
/**
@@ -601,7 +601,7 @@
601601
* @returns {Observable} An Observable sequence which wraps the jQuery fadeToggle method.
602602
*/
603603
proto.fadeToggleAsObservable = function(options) {
604-
return handeAnimation(this, 'fadeToggle', arguments);
604+
return handleAnimation(this, 'fadeToggle', arguments);
605605
};
606606

607607
/**
@@ -618,7 +618,7 @@
618618
* @returns {Observable} An Observable sequence which wraps the jQuery slideDown method.
619619
*/
620620
proto.slideDownAsObservable = function(options) {
621-
return handeAnimation(this, 'slideDown', arguments);
621+
return handleAnimation(this, 'slideDown', arguments);
622622
};
623623

624624
/**
@@ -635,7 +635,7 @@
635635
* @returns {Observable} An Observable sequence which wraps the jQuery slideUp method.
636636
*/
637637
proto.slideUpAsObservable = function(options) {
638-
return handeAnimation(this, 'slideUp', arguments);
638+
return handleAnimation(this, 'slideUp', arguments);
639639
};
640640

641641
/**
@@ -652,7 +652,7 @@
652652
* @returns {Observable} An Observable sequence which wraps the jQuery slideToggle method.
653653
*/
654654
proto.slideToggleAsObservable = function(options) {
655-
return handeAnimation(this, 'slideToggle', arguments);
655+
return handleAnimation(this, 'slideToggle', arguments);
656656
};
657657

658658
/**
@@ -669,7 +669,7 @@
669669
* @returns {Observable} An Observable sequence which wraps the jQuery slideToggle method.
670670
*/
671671
proto.toggleAsObservable = function(duration, easing) {
672-
return handeAnimation(this, 'toggle', arguments);
672+
return handleAnimation(this, 'toggle', arguments);
673673
};
674674
var ajaxAsObservable = $.ajaxAsObservable = function(settings) {
675675
var subject = new AsyncSubject();

rx.jquery.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/animation.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function handeAnimation(jQueryProto, method, args) {
1+
function handleAnimation(jQueryProto, method, args) {
22
var options = args[0];
33

44
// Check for duration
@@ -16,7 +16,7 @@
1616
var subject = new AsyncSubject();
1717

1818
options.complete = function() {
19-
subject.onNext(this);
19+
subject.onNext(jQueryProto);
2020
subject.onCompleted();
2121
};
2222

@@ -39,7 +39,7 @@
3939
* @returns {Observable} An Observable sequence which wraps the jQuery hide method.
4040
*/
4141
proto.hideAsObservable = function (options) {
42-
return handeAnimation(this, 'hide', arguments);
42+
return handleAnimation(this, 'hide', arguments);
4343
};
4444

4545
/**
@@ -56,7 +56,7 @@
5656
* @returns {Observable} An Observable sequence which wraps the jQuery show method.
5757
*/
5858
proto.showAsObservable = function(options) {
59-
return handeAnimation(this, 'show', arguments);
59+
return handleAnimation(this, 'show', arguments);
6060
};
6161

6262
/**
@@ -112,7 +112,7 @@
112112
* @returns {Observable} An Observable sequence which wraps the jQuery fadeIn method.
113113
*/
114114
proto.fadeInAsObservable = function(options) {
115-
return handeAnimation(this, 'fadeIn', arguments);
115+
return handleAnimation(this, 'fadeIn', arguments);
116116
};
117117

118118
/**
@@ -127,7 +127,7 @@
127127
var subject = new AsyncSubject();
128128

129129
this.fadeTo(duration, opacity, easing, function() {
130-
subject.onNext(this);
130+
subject.onNext(proto);
131131
subject.onCompleted();
132132
});
133133

@@ -148,7 +148,7 @@
148148
* @returns {Observable} An Observable sequence which wraps the jQuery fadeOut method.
149149
*/
150150
proto.fadeOutAsObservable = function(options) {
151-
return handeAnimation(this, 'fadeOut', arguments);
151+
return handleAnimation(this, 'fadeOut', arguments);
152152
};
153153

154154
/**
@@ -165,7 +165,7 @@
165165
* @returns {Observable} An Observable sequence which wraps the jQuery fadeToggle method.
166166
*/
167167
proto.fadeToggleAsObservable = function(options) {
168-
return handeAnimation(this, 'fadeToggle', arguments);
168+
return handleAnimation(this, 'fadeToggle', arguments);
169169
};
170170

171171
/**
@@ -182,7 +182,7 @@
182182
* @returns {Observable} An Observable sequence which wraps the jQuery slideDown method.
183183
*/
184184
proto.slideDownAsObservable = function(options) {
185-
return handeAnimation(this, 'slideDown', arguments);
185+
return handleAnimation(this, 'slideDown', arguments);
186186
};
187187

188188
/**
@@ -199,7 +199,7 @@
199199
* @returns {Observable} An Observable sequence which wraps the jQuery slideUp method.
200200
*/
201201
proto.slideUpAsObservable = function(options) {
202-
return handeAnimation(this, 'slideUp', arguments);
202+
return handleAnimation(this, 'slideUp', arguments);
203203
};
204204

205205
/**
@@ -216,7 +216,7 @@
216216
* @returns {Observable} An Observable sequence which wraps the jQuery slideToggle method.
217217
*/
218218
proto.slideToggleAsObservable = function(options) {
219-
return handeAnimation(this, 'slideToggle', arguments);
219+
return handleAnimation(this, 'slideToggle', arguments);
220220
};
221221

222222
/**
@@ -233,5 +233,5 @@
233233
* @returns {Observable} An Observable sequence which wraps the jQuery slideToggle method.
234234
*/
235235
proto.toggleAsObservable = function(duration, easing) {
236-
return handeAnimation(this, 'toggle', arguments);
236+
return handleAnimation(this, 'toggle', arguments);
237237
};

tests/rx.jquery.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<script src="./vendor/jquery-1.10.2.min.js"></script>
1212
<script src="../node_modules/rx/rx.js"></script>
1313
<script src="../node_modules/rx/rx.binding.js"></script>
14+
<script src="../node_modules/rx/rx.virtualtime.js"></script>
1415
<script src="../node_modules/rx/rx.testing.js"></script>
1516
<script src="../rx.jquery.js"></script>
1617

0 commit comments

Comments
 (0)