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
339aab91
Commit
339aab91
authored
Jan 21, 2014
by
Nick Schonning
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JSCS: Don't stick operators to values
Fix jQuery preset as per
https://github.com/mdevils/node-jscs/issues/117
parent
fcc7c16b
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
27 deletions
+27
-27
Gruntfile.js
Gruntfile.js
+1
-1
jquery.flot.errorbars.js
jquery.flot.errorbars.js
+4
-4
jquery.flot.image.js
jquery.flot.image.js
+2
-2
jquery.flot.js
jquery.flot.js
+10
-10
jquery.flot.pie.js
jquery.flot.pie.js
+3
-3
jquery.flot.symbol.js
jquery.flot.symbol.js
+4
-4
jquery.flot.threshold.js
jquery.flot.threshold.js
+3
-3
No files found.
Gruntfile.js
View file @
339aab91
...
...
@@ -55,7 +55,7 @@ module.exports = function(grunt) {
"requireMultipleVarDecl"
:
true
,
"requireSpacesInsideObjectBrackets"
:
"all"
,
// Different from jQuery preset
"disallowSpacesInsideArrayBrackets"
:
true
,
// Different from jQuery preset
"disallowLeftStickedOperators"
:
[
"?"
,
"
-"
,
"
/"
,
"*"
,
"="
,
"=="
,
"==="
,
"!="
,
"!=="
,
">"
,
">="
,
"<"
,
"<="
],
"disallowLeftStickedOperators"
:
[
"?"
,
"/"
,
"*"
,
"="
,
"=="
,
"==="
,
"!="
,
"!=="
,
">"
,
">="
,
"<"
,
"<="
],
"disallowRightStickedOperators"
:
[
"?"
,
"/"
,
"*"
,
":"
,
"="
,
"=="
,
"==="
,
"!="
,
"!=="
,
">"
,
">="
,
"<"
,
"<="
],
"requireSpaceBeforeBinaryOperators"
:
[
"+"
,
"-"
,
"/"
,
"*"
,
"="
,
"=="
,
"==="
,
"!="
,
"!=="
],
"disallowSpaceAfterPrefixUnaryOperators"
:
[
"++"
,
"--"
,
"+"
,
"-"
],
...
...
jquery.flot.errorbars.js
View file @
339aab91
...
...
@@ -278,13 +278,13 @@ shadowSize and lineWidth are derived as well from the points series.
var
w
=
sw
/
2
;
ctx
.
lineWidth
=
w
;
ctx
.
strokeStyle
=
"rgba(0,0,0,0.1)"
;
drawError
(
ctx
,
err
[
e
],
x
,
y
,
upper
,
lower
,
drawUpper
,
drawLower
,
radius
,
w
+
w
/
2
,
minmax
);
drawError
(
ctx
,
err
[
e
],
x
,
y
,
upper
,
lower
,
drawUpper
,
drawLower
,
radius
,
w
+
w
/
2
,
minmax
);
ctx
.
strokeStyle
=
"rgba(0,0,0,0.2)"
;
drawError
(
ctx
,
err
[
e
],
x
,
y
,
upper
,
lower
,
drawUpper
,
drawLower
,
radius
,
w
/
2
,
minmax
);
drawError
(
ctx
,
err
[
e
],
x
,
y
,
upper
,
lower
,
drawUpper
,
drawLower
,
radius
,
w
/
2
,
minmax
);
}
ctx
.
strokeStyle
=
err
[
e
].
color
?
err
[
e
].
color
:
s
.
color
;
ctx
.
strokeStyle
=
err
[
e
].
color
?
err
[
e
].
color
:
s
.
color
;
ctx
.
lineWidth
=
lw
;
//draw it
drawError
(
ctx
,
err
[
e
],
x
,
y
,
upper
,
lower
,
drawUpper
,
drawLower
,
radius
,
0
,
minmax
);
...
...
@@ -327,7 +327,7 @@ shadowSize and lineWidth are derived as well from the points series.
//internal radius value in errorbar, allows to plot radius 0 points and still keep proper sized caps
//this is a way to get errorbars on lines without visible connecting dots
radius
=
err
.
radius
!=
null
?
err
.
radius
:
radius
;
radius
=
err
.
radius
!=
null
?
err
.
radius
:
radius
;
// upper cap
if
(
drawUpper
)
{
...
...
jquery.flot.image.js
View file @
339aab91
...
...
@@ -158,10 +158,10 @@ Google Maps).
// if the anchor is at the center of the pixel, expand the
// image by 1/2 pixel in each direction
if
(
series
.
images
.
anchor
===
"center"
)
{
tmp
=
0.5
*
(
x2
-
x1
)
/
(
img
.
width
-
1
);
tmp
=
0.5
*
(
x2
-
x1
)
/
(
img
.
width
-
1
);
x1
-=
tmp
;
x2
+=
tmp
;
tmp
=
0.5
*
(
y2
-
y1
)
/
(
img
.
height
-
1
);
tmp
=
0.5
*
(
y2
-
y1
)
/
(
img
.
height
-
1
);
y1
-=
tmp
;
y2
+=
tmp
;
}
...
...
jquery.flot.js
View file @
339aab91
...
...
@@ -710,7 +710,7 @@ Licensed under the MIT license.
mouseActiveRadius
:
10
// how far the mouse can be away to activate an item
},
interaction
:
{
redrawOverlayInterval
:
1000
/
60
// time between updates, -1 means in same flow
redrawOverlayInterval
:
1000
/
60
// time between updates, -1 means in same flow
},
hooks
:
{}
},
...
...
@@ -2365,7 +2365,7 @@ Licensed under the MIT license.
ctx
.
lineWidth
=
bw
.
left
;
ctx
.
beginPath
();
ctx
.
moveTo
(
0
-
bw
.
left
/
2
,
plotHeight
+
bw
.
bottom
);
ctx
.
lineTo
(
0
-
bw
.
left
/
2
,
0
);
ctx
.
lineTo
(
0
-
bw
.
left
/
2
,
0
);
ctx
.
stroke
();
}
}
else
{
...
...
jquery.flot.pie.js
View file @
339aab91
...
...
@@ -101,7 +101,7 @@ More detail and specific examples can be found in the included HTML file.
if
(
options
.
series
.
pie
.
radius
===
"auto"
)
{
if
(
options
.
series
.
pie
.
label
.
show
)
{
options
.
series
.
pie
.
radius
=
3
/
4
;
options
.
series
.
pie
.
radius
=
3
/
4
;
}
else
{
options
.
series
.
pie
.
radius
=
1
;
}
...
...
@@ -567,7 +567,7 @@ More detail and specific examples can be found in the included HTML file.
function
isPointInPoly
(
poly
,
pt
)
{
for
(
var
c
=
false
,
i
=
-
1
,
l
=
poly
.
length
,
j
=
l
-
1
;
++
i
<
l
;
j
=
i
)
{
((
poly
[
i
][
1
]
<=
pt
[
1
]
&&
pt
[
1
]
<
poly
[
j
][
1
])
||
(
poly
[
j
][
1
]
<=
pt
[
1
]
&&
pt
[
1
]
<
poly
[
i
][
1
]))
&&
(
poly
[
j
][
1
]
<=
pt
[
1
]
&&
pt
[
1
]
<
poly
[
i
][
1
]))
&&
(
pt
[
0
]
<
(
poly
[
j
][
0
]
-
poly
[
i
][
0
])
*
(
pt
[
1
]
-
poly
[
i
][
1
])
/
(
poly
[
j
][
1
]
-
poly
[
i
][
1
])
+
poly
[
i
][
0
])
&&
(
c
=
!
c
);
}
...
...
@@ -774,7 +774,7 @@ More detail and specific examples can be found in the included HTML file.
show
:
false
,
radius
:
"auto"
,
// actual radius of the visible pie (based on full calculated radius if <=1, or hard pixel value)
innerRadius
:
0
,
/* for donut */
startAngle
:
3
/
2
,
startAngle
:
3
/
2
,
tilt
:
1
,
shadow
:
{
left
:
5
,
// shadow left offset
...
...
jquery.flot.symbol.js
View file @
339aab91
...
...
@@ -37,11 +37,11 @@ The symbols are accessed as strings through the standard symbol options:
// pi * r^2 = 1/2 * s^2 * sin (pi / 3) => s = r * sqrt(2 * pi / sin(pi / 3))
var
size
=
radius
*
Math
.
sqrt
(
2
*
Math
.
PI
/
Math
.
sin
(
Math
.
PI
/
3
));
var
height
=
size
*
Math
.
sin
(
Math
.
PI
/
3
);
ctx
.
moveTo
(
x
-
size
/
2
,
y
+
height
/
2
);
ctx
.
lineTo
(
x
+
size
/
2
,
y
+
height
/
2
);
ctx
.
moveTo
(
x
-
size
/
2
,
y
+
height
/
2
);
ctx
.
lineTo
(
x
+
size
/
2
,
y
+
height
/
2
);
if
(
!
shadow
)
{
ctx
.
lineTo
(
x
,
y
-
height
/
2
);
ctx
.
lineTo
(
x
-
size
/
2
,
y
+
height
/
2
);
ctx
.
lineTo
(
x
,
y
-
height
/
2
);
ctx
.
lineTo
(
x
-
size
/
2
,
y
+
height
/
2
);
}
},
cross
:
function
(
ctx
,
x
,
y
,
radius
)
{
...
...
jquery.flot.threshold.js
View file @
339aab91
...
...
@@ -148,8 +148,8 @@ You may need to check for this in hover events.
if
(
$
(
this
).
text
()
===
s
.
label
)
{
var
legend
=
$
(
this
).
prev
().
find
(
"div > div"
);
legend
.
css
(
"border-right-color"
,
color
);
legend
.
css
(
"border-bottom-color"
,
color
);
legend
.
css
(
"border-right-color"
,
color
);
legend
.
css
(
"border-bottom-color"
,
color
);
}
});
}
...
...
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