Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
ce4e8910
Commit
ce4e8910
authored
Jul 27, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolve no-mixed-operators and no-return-assign eslint violations
parent
45a446ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
app/assets/javascripts/users/activity_calendar.js
app/assets/javascripts/users/activity_calendar.js
+6
-6
No files found.
app/assets/javascripts/users/activity_calendar.js
View file @
ce4e8910
/* eslint-disable no-var, vars-on-top, eqeqeq, n
o-mixed-operators, no-return-assign, n
ewline-per-chained-call, prefer-arrow-callback, consistent-return, one-var, one-var-declaration-per-line, prefer-template, quotes, no-unused-vars, no-else-return, max-len, class-methods-use-this */
/* eslint-disable no-var, vars-on-top, eqeqeq, newline-per-chained-call, prefer-arrow-callback, consistent-return, one-var, one-var-declaration-per-line, prefer-template, quotes, no-unused-vars, no-else-return, max-len, class-methods-use-this */
import
d3
from
'
d3
'
;
...
...
@@ -77,8 +77,8 @@ export default class ActivityCalendar {
}
renderSvg
(
group
)
{
var
width
=
(
group
+
1
)
*
this
.
daySizeWithSpace
+
this
.
getExtraWidthPadding
(
group
);
return
this
.
svg
=
d3
.
select
(
'
.js-contrib-calendar
'
).
append
(
'
svg
'
).
attr
(
'
width
'
,
width
).
attr
(
'
height
'
,
167
).
attr
(
'
class
'
,
'
contrib-calendar
'
);
var
width
=
(
(
group
+
1
)
*
this
.
daySizeWithSpace
)
+
this
.
getExtraWidthPadding
(
group
);
this
.
svg
=
d3
.
select
(
'
.js-contrib-calendar
'
).
append
(
'
svg
'
).
attr
(
'
width
'
,
width
).
attr
(
'
height
'
,
167
).
attr
(
'
class
'
,
'
contrib-calendar
'
);
}
renderDays
()
{
...
...
@@ -88,7 +88,7 @@ export default class ActivityCalendar {
var
lastMonth
,
lastMonthX
,
month
,
x
;
if
(
a
===
0
&&
stamp
.
day
===
0
)
{
month
=
stamp
.
date
.
getMonth
();
x
=
(
this
.
daySizeWithSpace
*
i
+
1
)
+
this
.
daySizeWithSpace
;
x
=
(
this
.
daySizeWithSpace
*
i
)
+
1
+
this
.
daySizeWithSpace
;
lastMonth
=
_
.
last
(
this
.
months
);
if
(
lastMonth
!=
null
)
{
lastMonthX
=
lastMonth
.
x
;
...
...
@@ -100,7 +100,7 @@ export default class ActivityCalendar {
}
}
});
return
"
translate(
"
+
((
this
.
daySizeWithSpace
*
i
+
1
)
+
this
.
daySizeWithSpace
)
+
"
, 18)
"
;
return
"
translate(
"
+
((
this
.
daySizeWithSpace
*
i
)
+
1
+
this
.
daySizeWithSpace
)
+
"
, 18)
"
;
})
.
selectAll
(
'
rect
'
)
.
data
(
stamp
=>
stamp
)
...
...
@@ -174,7 +174,7 @@ export default class ActivityCalendar {
const
keyColors
=
[
'
#ededed
'
,
this
.
colorKey
(
0
),
this
.
colorKey
(
1
),
this
.
colorKey
(
2
),
this
.
colorKey
(
3
)];
this
.
svg
.
append
(
'
g
'
)
.
attr
(
'
transform
'
,
`translate(18,
${
this
.
daySizeWithSpace
*
8
+
16
}
)`
)
.
attr
(
'
transform
'
,
`translate(18,
${
(
this
.
daySizeWithSpace
*
8
)
+
16
}
)`
)
.
selectAll
(
'
rect
'
)
.
data
(
keyColors
)
.
enter
()
...
...
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