FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
divis/examples/script.js at master · angularsnipp/divis · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
angularsnipp
/
divis
Public
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
divis
/
examples
/
script.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
31 lines (28 loc) · 842 Bytes
Breadcrumbs
divis
/
examples
/
script.js
Copy path
File metadata and controls
31 lines (28 loc) · 842 Bytes
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
function
generate
(
n
,
f
)
{
f
=
f
||
function
(
i
)
{
return
i
}
var
arr
=
[
]
;
for
(
var
i
=
1
;
i
<=
n
;
i
++
)
{
arr
.
push
(
f
(
i
)
)
}
return
arr
;
}
function
logEvent
(
element
,
_
,
text
)
{
if
(
_
)
{
text
=
'<div class="log-event">'
+
_
.
event
+
'</div>'
+
'<div class="log-data">data: <pre>'
+
JSON
.
stringify
(
_
.
d
,
null
,
2
)
+
'</pre></div>'
+
'<div class="log-index">index: '
+
_
.
i
+
'</div>'
;
if
(
_
.
hasOwnProperty
(
's'
)
)
text
+=
'<div class="log-series-index">series index: '
+
_
.
s
+
'</div>'
;
}
var
log
=
document
.
getElementById
(
element
)
;
var
div
=
document
.
createElement
(
'div'
)
;
div
.
innerHTML
=
text
;
log
.
appendChild
(
div
)
;
log
.
scrollTop
=
log
.
scrollHeight
;
}
function
onResizeHandler
(
callback
)
{
document
.
addEventListener
(
'DOMContentLoaded'
,
function
(
)
{
window
.
addEventListener
(
'resize'
,
callback
)
}
)
}
Back
|
FazBrowse Home
|
New Git URL