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
947ba2f8
Commit
947ba2f8
authored
Nov 07, 2013
by
Anthony Ryan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the jQuery tag creation process
Move the rowBuffer definition closer to it's usage within the method
parent
bec29dcd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
jquery.flot.js
jquery.flot.js
+10
-11
No files found.
jquery.flot.js
View file @
947ba2f8
...
...
@@ -2928,8 +2928,7 @@ Licensed under the MIT license.
return
;
}
var
entries
=
[],
rowBuffer
=
null
,
lf
=
options
.
legend
.
labelFormatter
,
s
,
label
,
i
;
var
entries
=
[],
lf
=
options
.
legend
.
labelFormatter
,
s
,
label
,
i
;
// Build a list of legend entries, with each having a label and a color
...
...
@@ -2971,10 +2970,10 @@ Licensed under the MIT license.
// Generate markup for the list of entries, in their final order
var
table
=
$
(
"<table>"
).
css
({
var
table
=
$
(
"<table>
</table>
"
).
css
({
"font-size"
:
"smaller"
,
"color"
:
options
.
grid
.
color
});
})
,
rowBuffer
=
null
;
for
(
i
=
0
;
i
<
entries
.
length
;
++
i
)
{
...
...
@@ -2984,24 +2983,24 @@ Licensed under the MIT license.
if
(
rowBuffer
!==
null
)
{
table
.
append
(
rowBuffer
);
}
rowBuffer
=
$
(
"<tr>"
);
rowBuffer
=
$
(
"<tr>
</tr>
"
);
}
var
colorbox
=
$
(
"<div>"
).
css
({
var
colorbox
=
$
(
"<div>
</div>
"
).
css
({
"width"
:
"4px"
,
"height"
:
0
,
"border"
:
"5px solid "
+
entry
.
color
,
"overflow"
:
"hidden"
}),
borderbox
=
$
(
"<div>"
).
css
({
borderbox
=
$
(
"<div>
</div>
"
).
css
({
"border"
:
"1px solid "
+
options
.
legend
.
labelBoxBorderColor
,
"padding"
:
"1px"
});
rowBuffer
.
append
(
$
(
"<td>"
).
addClass
(
"legendColorBox"
).
append
(
borderbox
.
append
(
colorbox
)),
$
(
"<td>"
).
addClass
(
"legendLabel"
).
html
(
entry
.
label
)
$
(
"<td>
</td>
"
).
addClass
(
"legendColorBox"
).
append
(
borderbox
.
append
(
colorbox
)),
$
(
"<td>
</td>
"
).
addClass
(
"legendLabel"
).
html
(
entry
.
label
)
);
}
...
...
@@ -3026,7 +3025,7 @@ Licensed under the MIT license.
}
else
if
(
p
.
charAt
(
1
)
===
"w"
)
{
pos
.
left
=
(
m
[
0
]
+
plotOffset
.
left
)
+
"px"
;
}
var
legend
=
$
(
"<div>"
).
addClass
(
"legend"
).
append
(
table
.
css
(
pos
)).
appendTo
(
placeholder
);
var
legend
=
$
(
"<div>
</div>
"
).
addClass
(
"legend"
).
append
(
table
.
css
(
pos
)).
appendTo
(
placeholder
);
if
(
options
.
legend
.
backgroundOpacity
!==
0.0
)
{
// put in the transparent background
// separately to avoid blended labels and
...
...
@@ -3045,7 +3044,7 @@ Licensed under the MIT license.
var
div
=
legend
.
children
();
// Position also applies to this
$
(
"<div>"
).
css
(
pos
).
css
({
$
(
"<div>
</div>
"
).
css
(
pos
).
css
({
"width"
:
div
.
width
()
+
"px"
,
"height"
:
div
.
height
()
+
"px"
,
"background-color"
:
c
,
...
...
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