Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
F
flot
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HS-public
flot
Commits
2a3e3cd4
Commit
2a3e3cd4
authored
Apr 20, 2014
by
David Schnur
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1289 from dnschnur/resize-rate-fix
Update the inline resize plugin with recent fixes.
parents
1d3a0628
e31ff8e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
index.html
examples/resize/index.html
+1
-1
jquery.flot.resize.js
jquery.flot.resize.js
+1
-2
No files found.
examples/resize/index.html
View file @
2a3e3cd4
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
maxWidth
:
900
,
maxWidth
:
900
,
maxHeight
:
500
,
maxHeight
:
500
,
minWidth
:
450
,
minWidth
:
450
,
minHeight
:
250
,
minHeight
:
250
});
});
// Add the Flot version string to the footer
// Add the Flot version string to the footer
...
...
jquery.flot.resize.js
View file @
2a3e3cd4
...
@@ -19,8 +19,7 @@ can just fix the size of their placeholders.
...
@@ -19,8 +19,7 @@ can just fix the size of their placeholders.
* Dual licensed under the MIT and GPL licenses.
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
* http://benalman.com/about/license/
*/
*/
(
function
(
$
,
e
,
t
){
"$:nomunge"
;
var
i
=
[],
n
=
$
.
resize
=
$
.
extend
(
$
.
resize
,{}),
a
,
r
=
false
,
s
=
"setTimeout"
,
u
=
"resize"
,
m
=
u
+
"-special-event"
,
o
=
"pendingDelay"
,
l
=
"activeDelay"
,
f
=
"throttleWindow"
;
n
[
o
]
=
200
;
n
[
l
]
=
20
;
n
[
f
]
=
true
;
$
.
event
.
special
[
u
]
=
{
setup
:
function
(){
if
(
!
n
[
f
]
&&
this
[
s
]){
return
false
}
var
e
=
$
(
this
);
i
.
push
(
this
);
e
.
data
(
m
,{
w
:
e
.
width
(),
h
:
e
.
height
()});
if
(
i
.
length
===
1
){
a
=
t
;
h
()}},
teardown
:
function
(){
if
(
!
n
[
f
]
&&
this
[
s
]){
return
false
}
var
e
=
$
(
this
);
for
(
var
t
=
i
.
length
-
1
;
t
>=
0
;
t
--
){
if
(
i
[
t
]
==
this
){
i
.
splice
(
t
,
1
);
break
}}
e
.
removeData
(
m
);
if
(
!
i
.
length
){
if
(
r
){
cancelAnimationFrame
(
a
)}
else
{
clearTimeout
(
a
)}
a
=
null
}},
add
:
function
(
e
){
if
(
!
n
[
f
]
&&
this
[
s
]){
return
false
}
var
i
;
function
a
(
e
,
n
,
a
){
var
r
=
$
(
this
),
s
=
r
.
data
(
m
)
||
{};
s
.
w
=
n
!==
t
?
n
:
r
.
width
();
s
.
h
=
a
!==
t
?
a
:
r
.
height
();
i
.
apply
(
this
,
arguments
)}
if
(
$
.
isFunction
(
e
)){
i
=
e
;
return
a
}
else
{
i
=
e
.
handler
;
e
.
handler
=
a
}}};
function
h
(
t
){
if
(
r
===
true
){
r
=
t
||
1
}
for
(
var
s
=
i
.
length
-
1
;
s
>=
0
;
s
--
){
var
l
=
$
(
i
[
s
]);
if
(
l
[
0
]
==
e
||
l
.
is
(
":visible"
)){
var
f
=
l
.
width
(),
c
=
l
.
height
(),
d
=
l
.
data
(
m
);
if
(
d
&&
(
f
!==
d
.
w
||
c
!==
d
.
h
)){
l
.
trigger
(
u
,[
d
.
w
=
f
,
d
.
h
=
c
]);
r
=
t
||
true
}}
else
{
d
=
l
.
data
(
m
);
d
.
w
=
0
;
d
.
h
=
0
}}
if
(
a
!==
null
){
if
(
r
&&
(
t
==
null
||
t
-
r
<
1
e3
)){
a
=
e
.
requestAnimationFrame
(
h
)}
else
{
a
=
setTimeout
(
h
,
n
[
o
]);
r
=
false
}}}
if
(
!
e
.
requestAnimationFrame
){
e
.
requestAnimationFrame
=
function
(){
return
e
.
webkitRequestAnimationFrame
||
e
.
mozRequestAnimationFrame
||
e
.
oRequestAnimationFrame
||
e
.
msRequestAnimationFrame
||
function
(
t
,
i
){
return
e
.
setTimeout
(
function
(){
t
((
new
Date
).
getTime
())},
n
[
l
])}}()}
if
(
!
e
.
cancelAnimationFrame
){
e
.
cancelAnimationFrame
=
function
(){
return
e
.
webkitCancelRequestAnimationFrame
||
e
.
mozCancelRequestAnimationFrame
||
e
.
oCancelRequestAnimationFrame
||
e
.
msCancelRequestAnimationFrame
||
clearTimeout
}()}})(
jQuery
,
this
);
(
function
(
$
,
t
,
n
){
function
p
(){
for
(
var
n
=
r
.
length
-
1
;
n
>=
0
;
n
--
){
var
o
=
$
(
r
[
n
]);
if
(
o
[
0
]
==
t
||
o
.
is
(
":visible"
)){
var
h
=
o
.
width
(),
d
=
o
.
height
(),
v
=
o
.
data
(
a
);
!
v
||
h
===
v
.
w
&&
d
===
v
.
h
?
i
[
f
]
=
i
[
l
]:(
i
[
f
]
=
i
[
c
],
o
.
trigger
(
u
,[
v
.
w
=
h
,
v
.
h
=
d
]))}
else
v
=
o
.
data
(
a
),
v
.
w
=
0
,
v
.
h
=
0
}
s
!==
null
&&
(
s
=
t
.
requestAnimationFrame
(
p
))}
var
r
=
[],
i
=
$
.
resize
=
$
.
extend
(
$
.
resize
,{}),
s
,
o
=
"setTimeout"
,
u
=
"resize"
,
a
=
u
+
"-special-event"
,
f
=
"delay"
,
l
=
"pendingDelay"
,
c
=
"activeDelay"
,
h
=
"throttleWindow"
;
i
[
l
]
=
250
,
i
[
c
]
=
20
,
i
[
f
]
=
i
[
l
],
i
[
h
]
=!
0
,
$
.
event
.
special
[
u
]
=
{
setup
:
function
(){
if
(
!
i
[
h
]
&&
this
[
o
])
return
!
1
;
var
t
=
$
(
this
);
r
.
push
(
this
),
t
.
data
(
a
,{
w
:
t
.
width
(),
h
:
t
.
height
()}),
r
.
length
===
1
&&
(
s
=
n
,
p
())},
teardown
:
function
(){
if
(
!
i
[
h
]
&&
this
[
o
])
return
!
1
;
var
t
=
$
(
this
);
for
(
var
n
=
r
.
length
-
1
;
n
>=
0
;
n
--
)
if
(
r
[
n
]
==
this
){
r
.
splice
(
n
,
1
);
break
}
t
.
removeData
(
a
),
r
.
length
||
(
cancelAnimationFrame
(
s
),
s
=
null
)},
add
:
function
(
t
){
function
s
(
t
,
i
,
s
){
var
o
=
$
(
this
),
u
=
o
.
data
(
a
);
u
.
w
=
i
!==
n
?
i
:
o
.
width
(),
u
.
h
=
s
!==
n
?
s
:
o
.
height
(),
r
.
apply
(
this
,
arguments
)}
if
(
!
i
[
h
]
&&
this
[
o
])
return
!
1
;
var
r
;
if
(
$
.
isFunction
(
t
))
return
r
=
t
,
s
;
r
=
t
.
handler
,
t
.
handler
=
s
}},
t
.
requestAnimationFrame
||
(
t
.
requestAnimationFrame
=
function
(){
return
t
.
webkitRequestAnimationFrame
||
t
.
mozRequestAnimationFrame
||
t
.
oRequestAnimationFrame
||
t
.
msRequestAnimationFrame
||
function
(
e
,
n
){
return
t
.
setTimeout
(
e
,
i
[
f
])}}()),
t
.
cancelAnimationFrame
||
(
t
.
cancelAnimationFrame
=
function
(){
return
t
.
webkitCancelRequestAnimationFrame
||
t
.
mozCancelRequestAnimationFrame
||
t
.
oCancelRequestAnimationFrame
||
t
.
msCancelRequestAnimationFrame
||
clearTimeout
}())})(
jQuery
,
this
);
(
function
(
$
)
{
(
function
(
$
)
{
var
options
=
{
};
// no options
var
options
=
{
};
// no options
...
...
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