Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5590a3cb
authored
Feb 12, 2013
by
Dányi Bence
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webui: function throttle code moved
parent
101c2871
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
one/static/cloud.js
+18
-18
No files found.
one/static/cloud.js
View file @
5590a3cb
...
@@ -331,6 +331,24 @@ $(function() {
...
@@ -331,6 +331,24 @@ $(function() {
return
n
.
toFixed
(
precision
)
+
' '
+
suffix
[
i
];
return
n
.
toFixed
(
precision
)
+
' '
+
suffix
[
i
];
}
}
/**
* Returns throttled function
*/
function
throttle
(
f
)
{
var
disabled
=
false
;
return
function
()
{
if
(
disabled
)
{
return
};
disabled
=
true
;
setTimeout
(
function
()
{
disabled
=
false
;
},
700
);
f
.
apply
(
this
,
arguments
);
}
}
function
Model
()
{
function
Model
()
{
//alias for this
//alias for this
var
self
=
this
;
var
self
=
this
;
...
@@ -373,24 +391,6 @@ $(function() {
...
@@ -373,24 +391,6 @@ $(function() {
})
})
/**
/**
* Returns throttled function
*/
function
throttle
(
f
)
{
var
disabled
=
false
;
return
function
()
{
if
(
disabled
)
{
return
};
disabled
=
true
;
setTimeout
(
function
()
{
disabled
=
false
;
},
700
);
f
.
apply
(
null
,
arguments
);
}
}
/**
* Delay the function call for `f` until `g` evaluates true
* Delay the function call for `f` until `g` evaluates true
* Default check interval is 1 sec
* Default check interval is 1 sec
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment