FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
DefinitelyTyped/angular-scroll/angular-scroll-tests.ts at master · BrandonRbg/DefinitelyTyped · GitHub
BrandonRbg
/
DefinitelyTyped
Public
forked from
DefinitelyTyped/DefinitelyTyped
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
DefinitelyTyped
/
angular-scroll
/
angular-scroll-tests.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
64 lines (48 loc) · 3.46 KB
Breadcrumbs
DefinitelyTyped
/
angular-scroll
/
angular-scroll-tests.ts
Copy path
File metadata and controls
64 lines (48 loc) · 3.46 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
namespace
TestApp
{
class
TestController
{
constructor
(
$scope
:
ng
.
IScope
,
$document
:
duScroll
.
IDocumentService
)
{
var
positionFromTop
=
400
;
var
positionFromLeft
=
200
;
var
offsetInPixels
=
100
;
var
durationInMillis
=
2000
;
var
someElement
:
ng
.
IAugmentedJQuery
;
$document
.
duScrollTo
(
positionFromLeft
,
positionFromTop
)
;
$document
.
duScrollTo
(
positionFromLeft
,
positionFromTop
,
durationInMillis
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollTo
(
positionFromLeft
,
positionFromTop
,
durationInMillis
,
this
.
invertedEasingFn
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollTo
(
someElement
)
;
$document
.
duScrollTo
(
someElement
,
offsetInPixels
)
;
$document
.
duScrollTo
(
someElement
,
offsetInPixels
,
durationInMillis
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollTo
(
someElement
,
offsetInPixels
,
durationInMillis
,
this
.
invertedEasingFn
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollToElement
(
someElement
)
;
$document
.
duScrollToElement
(
someElement
,
offsetInPixels
)
;
$document
.
duScrollToElement
(
someElement
,
offsetInPixels
,
durationInMillis
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollToElement
(
someElement
,
offsetInPixels
,
durationInMillis
,
this
.
invertedEasingFn
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollToElementAnimated
(
someElement
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollToElementAnimated
(
someElement
,
offsetInPixels
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollToElementAnimated
(
someElement
,
offsetInPixels
,
durationInMillis
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollToElementAnimated
(
someElement
,
offsetInPixels
,
durationInMillis
,
this
.
invertedEasingFn
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollTop
(
positionFromTop
)
;
$document
.
duScrollTop
(
positionFromTop
,
durationInMillis
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollTop
(
positionFromTop
,
durationInMillis
,
this
.
invertedEasingFn
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollTopAnimated
(
positionFromTop
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollTopAnimated
(
positionFromTop
,
durationInMillis
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollTopAnimated
(
positionFromTop
,
durationInMillis
,
this
.
invertedEasingFn
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollLeft
(
positionFromLeft
)
;
$document
.
duScrollLeft
(
positionFromLeft
,
durationInMillis
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollLeft
(
positionFromLeft
,
durationInMillis
,
this
.
invertedEasingFn
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollLeftAnimated
(
positionFromLeft
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollLeftAnimated
(
positionFromLeft
,
durationInMillis
)
.
then
(
this
.
onScrollCompleted
)
;
$document
.
duScrollLeftAnimated
(
positionFromLeft
,
durationInMillis
,
this
.
invertedEasingFn
)
.
then
(
this
.
onScrollCompleted
)
;
var
verticalPosition
:
number
=
$document
.
duScrollTop
(
)
;
var
horixontalPosition
:
number
=
$document
.
duScrollLeft
(
)
;
}
private
invertedEasingFn
=
(
x
:
number
)
:
number
=>
{
return
1
-
x
;
}
private
onScrollCompleted
=
(
)
:
void
=>
{
console
.
log
(
'Done scrolling'
)
;
}
}
angular
.
module
(
'testApp'
,
[
'duScroll'
]
)
.
controller
(
'testController'
,
TestController
)
;
}
Back
|
FazBrowse Home
|
New Git URL