@@ -54,7 +54,7 @@ trait JQuery extends js.Object {
54
54
55
55
/** Perform a custom animation of a set of CSS properties. <br/>
56
56
* See: <a href="http://api.jquery.com/animate/">jQuery Docs</a> */
57
- private [jquery] def animate (properties : js.Dictionary [Any ], duration : Int , easing : String , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
57
+ private [jquery] def animate (properties : js.Dictionary [Any ], duration : Int , easing : EasingFunction , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
58
58
59
59
/** Perform a custom animation of a set of CSS properties. <br/>
60
60
* See: <a href="http://api.jquery.com/animate/">jQuery Docs</a> */
@@ -218,23 +218,23 @@ trait JQuery extends js.Object {
218
218
219
219
/** Display the matched elements by fading them to opaque. <br/>
220
220
* See: <a href="http://api.jquery.com/fadeIn/">jQuery Docs</a> */
221
- def fadeIn (duration : Int = js.native, easing : String = js.native): JQuery = js.native
221
+ def fadeIn (duration : Int = js.native, easing : EasingFunction = js.native): JQuery = js.native
222
222
223
223
/** Display the matched elements by fading them to opaque. <br/>
224
224
* See: <a href="http://api.jquery.com/fadeIn/">jQuery Docs</a> */
225
- private [jquery] def fadeIn (duration : Int , easing : String , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
225
+ private [jquery] def fadeIn (duration : Int , easing : EasingFunction , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
226
226
227
227
/** Display the matched elements by fading them to opaque. <br/>
228
228
* See: <a href="http://api.jquery.com/fadeIn/">jQuery Docs</a> */
229
229
private [jquery] def fadeIn (options : js.Dictionary [Any ]): JQuery = js.native
230
230
231
231
/** Hide the matched elements by fading them to transparent. <br/>
232
232
* See: <a href="http://api.jquery.com/fadeOut/">jQuery Docs</a> */
233
- def fadeOut (duration : Int = js.native, easing : String = js.native): JQuery = js.native
233
+ def fadeOut (duration : Int = js.native, easing : EasingFunction = js.native): JQuery = js.native
234
234
235
235
/** Hide the matched elements by fading them to transparent. <br/>
236
236
* See: <a href="http://api.jquery.com/fadeOut/">jQuery Docs</a> */
237
- private [jquery] def fadeOut (duration : Int , easing : String , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
237
+ private [jquery] def fadeOut (duration : Int , easing : EasingFunction , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
238
238
239
239
/** Hide the matched elements by fading them to transparent. <br/>
240
240
* See: <a href="http://api.jquery.com/fadeOut/">jQuery Docs</a> */
@@ -250,19 +250,19 @@ trait JQuery extends js.Object {
250
250
251
251
/** Adjust the opacity of the matched elements. <br/>
252
252
* See: <a href="http://api.jquery.com/fadeTo/">jQuery Docs</a> */
253
- def fadeTo (duration : Int , opacity : Double , easing : String ): JQuery = js.native
253
+ def fadeTo (duration : Int , opacity : Double , easing : EasingFunction ): JQuery = js.native
254
254
255
255
/** Adjust the opacity of the matched elements. <br/>
256
256
* See: <a href="http://api.jquery.com/fadeTo/">jQuery Docs</a> */
257
257
private [jquery] def fadeTo (duration : Int , opacity : Double , easing: String , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
258
258
259
259
/** Display or hide the matched elements by animating their opacity. <br/>
260
260
* See: <a href="http://api.jquery.com/fadeToggle/">jQuery Docs</a> */
261
- def fadeToggle (duration : Int = js.native, easing : String = js.native): JQuery = js.native
261
+ def fadeToggle (duration : Int = js.native, easing : EasingFunction = js.native): JQuery = js.native
262
262
263
263
/** Display or hide the matched elements by animating their opacity. <br/>
264
264
* See: <a href="http://api.jquery.com/fadeToggle/">jQuery Docs</a> */
265
- private [jquery] def fadeToggle (duration : Int , easing : String , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
265
+ private [jquery] def fadeToggle (duration : Int , easing : EasingFunction , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
266
266
267
267
/** Display or hide the matched elements by animating their opacity. <br/>
268
268
* See: <a href="http://api.jquery.com/fadeToggle/">jQuery Docs</a> */
@@ -336,11 +336,11 @@ trait JQuery extends js.Object {
336
336
337
337
/** Hide the matched elements. <br/>
338
338
* See: <a href="http://api.jquery.com/hide/">jQuery Docs</a> */
339
- def hide (duration : Int = js.native, easing : String = js.native): JQuery = js.native
339
+ def hide (duration : Int = js.native, easing : EasingFunction = js.native): JQuery = js.native
340
340
341
341
/** Hide the matched elements. <br/>
342
342
* See: <a href="http://api.jquery.com/hide/">jQuery Docs</a> */
343
- private [jquery] def hide (duration : Int , easing : String , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
343
+ private [jquery] def hide (duration : Int , easing : EasingFunction , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
344
344
345
345
/** Hide the matched elements. <br/>
346
346
* See: <a href="http://api.jquery.com/hide/">jQuery Docs</a> */
@@ -729,11 +729,11 @@ trait JQuery extends js.Object {
729
729
730
730
/** Display the matched elements. <br/>
731
731
* See: <a href="http://api.jquery.com/show/">jQuery Docs</a> */
732
- def show (duration : Int = js.native, easing : String = js.native): JQuery = js.native
732
+ def show (duration : Int = js.native, easing : EasingFunction = js.native): JQuery = js.native
733
733
734
734
/** Display the matched elements. <br/>
735
735
* See: <a href="http://api.jquery.com/show/">jQuery Docs</a> */
736
- private [jquery] def show (duration : Int , easing : String , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
736
+ private [jquery] def show (duration : Int , easing : EasingFunction , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
737
737
738
738
/** Display the matched elements. <br/>
739
739
* See: <a href="http://api.jquery.com/show/">jQuery Docs</a> */
@@ -749,35 +749,35 @@ trait JQuery extends js.Object {
749
749
750
750
/** Display the matched elements with a sliding motion. <br/>
751
751
* See: <a href="http://api.jquery.com/slideDown/">jQuery Docs</a> */
752
- def slideDown (duration : Int = js.native, easing : String = js.native): JQuery = js.native
752
+ def slideDown (duration : Int = js.native, easing : EasingFunction = js.native): JQuery = js.native
753
753
754
754
/** Display the matched elements with a sliding motion. <br/>
755
755
* See: <a href="http://api.jquery.com/slideDown/">jQuery Docs</a> */
756
- private [jquery] def slideDown (duration : Int , easing : String , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
756
+ private [jquery] def slideDown (duration : Int , easing : EasingFunction , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
757
757
758
758
/** Display the matched elements with a sliding motion. <br/>
759
759
* See: <a href="http://api.jquery.com/slideDown/">jQuery Docs</a> */
760
760
private [jquery] def slideDown (options : js.Dictionary [Any ]): JQuery = js.native
761
761
762
762
/** Display or hide the matched elements with a sliding motion. <br/>
763
763
* See: <a href="http://api.jquery.com/slideToggle/">jQuery Docs</a> */
764
- def slideToggle (duration : Int = js.native, easing : String = js.native): JQuery = js.native
764
+ def slideToggle (duration : Int = js.native, easing : EasingFunction = js.native): JQuery = js.native
765
765
766
766
/** Display or hide the matched elements with a sliding motion. <br/>
767
767
* See: <a href="http://api.jquery.com/slideToggle/">jQuery Docs</a> */
768
- private [jquery] def slideToggle (duration : Int , easing : String , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
768
+ private [jquery] def slideToggle (duration : Int , easing : EasingFunction , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
769
769
770
770
/** Display or hide the matched elements with a sliding motion. <br/>
771
771
* See: <a href="http://api.jquery.com/slideToggle/">jQuery Docs</a> */
772
772
private [jquery] def slideToggle (options : js.Dictionary [Any ]): JQuery = js.native
773
773
774
774
/** Hide the matched elements with a sliding motion. <br/>
775
775
* See: <a href="http://api.jquery.com/slideUp/">jQuery Docs</a> */
776
- def slideUp (duration : Int = js.native, easing : String = js.native): JQuery = js.native
776
+ def slideUp (duration : Int = js.native, easing : EasingFunction = js.native): JQuery = js.native
777
777
778
778
/** Hide the matched elements with a sliding motion. <br/>
779
779
* See: <a href="http://api.jquery.com/slideUp/">jQuery Docs</a> */
780
- private [jquery] def slideUp (duration : Int , easing : String , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
780
+ private [jquery] def slideUp (duration : Int , easing : EasingFunction , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
781
781
782
782
/** Hide the matched elements with a sliding motion. <br/>
783
783
* See: <a href="http://api.jquery.com/slideUp/">jQuery Docs</a> */
@@ -813,11 +813,11 @@ trait JQuery extends js.Object {
813
813
814
814
/** Display or hide the matched elements. <br/>
815
815
* See: <a href="http://api.jquery.com/toggle/">jQuery Docs</a> */
816
- def toggle (duration : Int = js.native, easing : String = js.native): JQuery = js.native
816
+ def toggle (duration : Int = js.native, easing : EasingFunction = js.native): JQuery = js.native
817
817
818
818
/** Display or hide the matched elements. <br/>
819
819
* See: <a href="http://api.jquery.com/toggle/">jQuery Docs</a> */
820
- private [jquery] def toggle (duration : Int , easing : String , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
820
+ private [jquery] def toggle (duration : Int , easing : EasingFunction , callback : js.ThisFunction0 [Element , Any ]): JQuery = js.native
821
821
822
822
/** Display or hide the matched elements. <br/>
823
823
* See: <a href="http://api.jquery.com/toggle/">jQuery Docs</a> */
@@ -919,28 +919,6 @@ object JQuery {
919
919
920
920
private val registrations : mutable.Map [Element , mutable.Buffer [CallbackRegistrationRef ]] = mutable.Map [Element , mutable.Buffer [CallbackRegistrationRef ]]()
921
921
922
- case class AnimationOptions (duration : Option [Int ] = None , easing : String = null , queue : Option [Boolean ] = None ,
923
- step : (Int , js.Dynamic ) => Any = null , progress : (JQueryPromise [js.Function1 [js.Any , js.Any ], js.Any ], Int , Int ) => js.Any = null ,
924
- complete : () => js.Any = null , start : JQueryPromise [js.Function1 [js.Any , js.Any ], js.Any ] => js.Any = null ,
925
- done : (JQueryPromise [js.Function1 [js.Any , js.Any ], js.Any ], Boolean ) => js.Any = null ,
926
- fail : (JQueryPromise [js.Function1 [js.Any , js.Any ], js.Any ], Boolean ) => js.Any = null ,
927
- always : (JQueryPromise [js.Function1 [js.Any , js.Any ], js.Any ], Boolean ) => js.Any = null ) {
928
- def toJSDictionary : js.Dictionary [Any ] = {
929
- val r = js.Dictionary [Any ]()
930
- if (duration.isDefined) r.update(" duration" , duration.get)
931
- if (easing != null ) r.update(" easing" , easing)
932
- if (queue.isDefined) r.update(" queue" , queue.get)
933
- if (step != null ) r.update(" step" , step)
934
- if (progress != null ) r.update(" progress" , progress)
935
- if (complete != null ) r.update(" complete" , complete)
936
- if (start != null ) r.update(" start" , start)
937
- if (done != null ) r.update(" done" , done)
938
- if (fail != null ) r.update(" fail" , fail)
939
- if (always != null ) r.update(" always" , always)
940
- r
941
- }
942
- }
943
-
944
922
implicit class JQueryWrapper (private val jquery : JQuery ) {
945
923
import js .JSConverters ._
946
924
@@ -964,7 +942,7 @@ object JQuery {
964
942
965
943
/** Perform a custom animation of a set of CSS properties. <br/>
966
944
* See: <a href="http://api.jquery.com/animate/">jQuery Docs</a> */
967
- def animate (properties : Map [String , Any ], duration : Int = 400 , easing : String = " swing" , callback : (Element ) => Any = (_) => {}): JQuery = jquery.animate(properties.toJSDictionary, duration, easing, callback)
945
+ def animate (properties : Map [String , Any ], duration : Int = 400 , easing : EasingFunction = EasingFunction . swing, callback : (Element ) => Any = (_) => {}): JQuery = jquery.animate(properties.toJSDictionary, duration, easing, callback)
968
946
969
947
/** Perform a custom animation of a set of CSS properties. <br/>
970
948
* See: <a href="http://api.jquery.com/animate/">jQuery Docs</a> */
@@ -1070,15 +1048,15 @@ object JQuery {
1070
1048
1071
1049
/** Display the matched elements by fading them to opaque. <br/>
1072
1050
* See: <a href="http://api.jquery.com/fadeIn/">jQuery Docs</a> */
1073
- def fadeIn (duration : Int , easing : String , callback : (Element ) => Any ): JQuery = jquery.fadeIn(duration, easing, callback)
1051
+ def fadeIn (duration : Int , easing : EasingFunction , callback : (Element ) => Any ): JQuery = jquery.fadeIn(duration, easing, callback)
1074
1052
1075
1053
/** Display the matched elements by fading them to opaque. <br/>
1076
1054
* See: <a href="http://api.jquery.com/fadeIn/">jQuery Docs</a> */
1077
1055
def fadeIn (options : AnimationOptions ): JQuery = jquery.fadeIn(options.toJSDictionary)
1078
1056
1079
1057
/** Hide the matched elements by fading them to transparent. <br/>
1080
1058
* See: <a href="http://api.jquery.com/fadeOut/">jQuery Docs</a> */
1081
- def fadeOut (duration : Int , easing : String , callback : (Element ) => Any ): JQuery = jquery.fadeOut(duration, easing, callback)
1059
+ def fadeOut (duration : Int , easing : EasingFunction , callback : (Element ) => Any ): JQuery = jquery.fadeOut(duration, easing, callback)
1082
1060
1083
1061
/** Hide the matched elements by fading them to transparent. <br/>
1084
1062
* See: <a href="http://api.jquery.com/fadeOut/">jQuery Docs</a> */
@@ -1090,11 +1068,11 @@ object JQuery {
1090
1068
1091
1069
/** Adjust the opacity of the matched elements. <br/>
1092
1070
* See: <a href="http://api.jquery.com/fadeTo/">jQuery Docs</a> */
1093
- def fadeTo (duration : Int , opacity : Double , easing : String , callback : (Element ) => Any ): JQuery = jquery.fadeTo(duration, opacity, easing, callback)
1071
+ def fadeTo (duration : Int , opacity : Double , easing : EasingFunction , callback : (Element ) => Any ): JQuery = jquery.fadeTo(duration, opacity, easing, callback)
1094
1072
1095
1073
/** Display or hide the matched elements by animating their opacity. <br/>
1096
1074
* See: <a href="http://api.jquery.com/fadeToggle/">jQuery Docs</a> */
1097
- def fadeToggle (duration : Int , easing : String , callback : (Element ) => Any ): JQuery = jquery.fadeToggle(duration, easing, callback)
1075
+ def fadeToggle (duration : Int , easing : EasingFunction , callback : (Element ) => Any ): JQuery = jquery.fadeToggle(duration, easing, callback)
1098
1076
1099
1077
/** Display or hide the matched elements by animating their opacity. <br/>
1100
1078
* See: <a href="http://api.jquery.com/fadeToggle/">jQuery Docs</a> */
@@ -1142,7 +1120,7 @@ object JQuery {
1142
1120
1143
1121
/** Hide the matched elements. <br/>
1144
1122
* See: <a href="http://api.jquery.com/hide/">jQuery Docs</a> */
1145
- def hide (duration : Int , easing : String , callback : (Element ) => Any ): JQuery = jquery.hide(duration, easing, callback)
1123
+ def hide (duration : Int , easing : EasingFunction , callback : (Element ) => Any ): JQuery = jquery.hide(duration, easing, callback)
1146
1124
1147
1125
/** Hide the matched elements. <br/>
1148
1126
* See: <a href="http://api.jquery.com/hide/">jQuery Docs</a> */
@@ -1451,31 +1429,31 @@ object JQuery {
1451
1429
1452
1430
/** Display the matched elements. <br/>
1453
1431
* See: <a href="http://api.jquery.com/show/">jQuery Docs</a> */
1454
- def show (duration : Int , easing : String , callback : (Element ) => Any ): JQuery = jquery.show(duration, easing, callback)
1432
+ def show (duration : Int , easing : EasingFunction , callback : (Element ) => Any ): JQuery = jquery.show(duration, easing, callback)
1455
1433
1456
1434
/** Display the matched elements. <br/>
1457
1435
* See: <a href="http://api.jquery.com/hide/">jQuery Docs</a> */
1458
1436
def show (options : AnimationOptions ): JQuery = jquery.show(options.toJSDictionary)
1459
1437
1460
1438
/** Display the matched elements with a sliding motion. <br/>
1461
1439
* See: <a href="http://api.jquery.com/slideDown/">jQuery Docs</a> */
1462
- def slideDown (duration : Int , easing : String , callback : (Element ) => Any ): JQuery = jquery.slideDown(duration, easing, callback)
1440
+ def slideDown (duration : Int , easing : EasingFunction , callback : (Element ) => Any ): JQuery = jquery.slideDown(duration, easing, callback)
1463
1441
1464
1442
/** Display the matched elements with a sliding motion. <br/>
1465
1443
* See: <a href="http://api.jquery.com/slideDown/">jQuery Docs</a> */
1466
1444
def slideDown (options : AnimationOptions ): JQuery = jquery.slideDown(options.toJSDictionary)
1467
1445
1468
1446
/** Display or hide the matched elements with a sliding motion. <br/>
1469
1447
* See: <a href="http://api.jquery.com/slideToggle/">jQuery Docs</a> */
1470
- def slideToggle (duration : Int , easing : String , callback : (Element ) => Any ): JQuery = jquery.slideToggle(duration, easing, callback)
1448
+ def slideToggle (duration : Int , easing : EasingFunction , callback : (Element ) => Any ): JQuery = jquery.slideToggle(duration, easing, callback)
1471
1449
1472
1450
/** Display or hide the matched elements with a sliding motion. <br/>
1473
1451
* See: <a href="http://api.jquery.com/slideToggle/">jQuery Docs</a> */
1474
1452
def slideToggle (options : AnimationOptions ): JQuery = jquery.slideToggle(options.toJSDictionary)
1475
1453
1476
1454
/** Hide the matched elements with a sliding motion. <br/>
1477
1455
* See: <a href="http://api.jquery.com/slideUp/">jQuery Docs</a> */
1478
- def slideUp (duration : Int , easing : String , callback : (Element ) => Any ): JQuery = jquery.slideUp(duration, easing, callback)
1456
+ def slideUp (duration : Int , easing : EasingFunction , callback : (Element ) => Any ): JQuery = jquery.slideUp(duration, easing, callback)
1479
1457
1480
1458
/** Hide the matched elements with a sliding motion. <br/>
1481
1459
* See: <a href="http://api.jquery.com/slideUp/">jQuery Docs</a> */
@@ -1499,7 +1477,7 @@ object JQuery {
1499
1477
1500
1478
/** Display or hide the matched elements. <br/>
1501
1479
* See: <a href="http://api.jquery.com/toggle/">jQuery Docs</a> */
1502
- def toggle (duration : Int , easing : String , callback : (Element ) => Any ): JQuery = jquery.toggle(duration, easing, callback)
1480
+ def toggle (duration : Int , easing : EasingFunction , callback : (Element ) => Any ): JQuery = jquery.toggle(duration, easing, callback)
1503
1481
1504
1482
/** Display or hide the matched elements. <br/>
1505
1483
* See: <a href="http://api.jquery.com/toggle/">jQuery Docs</a> */
0 commit comments