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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
090c9405
Commit
090c9405
authored
Mar 31, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename resize and animate methods for clarity
parent
2e40f0bd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/assets/javascripts/burndown_chart/burndown_chart.js
app/assets/javascripts/burndown_chart/burndown_chart.js
+3
-3
app/assets/javascripts/burndown_chart/index.js
app/assets/javascripts/burndown_chart/index.js
+2
-2
No files found.
app/assets/javascripts/burndown_chart/burndown_chart.js
View file @
090c9405
...
...
@@ -204,7 +204,7 @@ export default class BurndownChart {
}
// reset width and height to match the svg element, then re-render if necessary
r
esize
()
{
handleR
esize
()
{
const
dimensions
=
this
.
canvas
.
node
().
getBoundingClientRect
();
if
(
this
.
width
!==
dimensions
.
width
||
this
.
height
!==
dimensions
.
height
)
{
this
.
width
=
dimensions
.
width
;
...
...
@@ -320,7 +320,7 @@ export default class BurndownChart {
this
.
queuedRender
=
this
.
queuedRender
||
requestAnimationFrame
(()
=>
this
.
render
());
}
animate
(
seconds
=
5
)
{
animate
Resize
(
seconds
=
5
)
{
this
.
ticksLeft
=
this
.
ticksLeft
||
0
;
if
(
this
.
ticksLeft
<=
0
)
{
const
interval
=
setInterval
(()
=>
{
...
...
@@ -328,7 +328,7 @@ export default class BurndownChart {
if
(
this
.
ticksLeft
<=
0
)
{
clearInterval
(
interval
);
}
this
.
r
esize
();
this
.
handleR
esize
();
},
20
);
}
this
.
ticksLeft
=
seconds
*
50
;
...
...
app/assets/javascripts/burndown_chart/index.js
View file @
090c9405
...
...
@@ -18,6 +18,6 @@ $(() => {
});
chart
.
setData
(
testData
);
window
.
addEventListener
(
'
resize
'
,
()
=>
chart
.
animate
(
1
));
$
(
document
).
on
(
'
click
'
,
'
.js-sidebar-toggle
'
,
()
=>
chart
.
animate
(
2
));
window
.
addEventListener
(
'
resize
'
,
()
=>
chart
.
animate
Resize
(
1
));
$
(
document
).
on
(
'
click
'
,
'
.js-sidebar-toggle
'
,
()
=>
chart
.
animate
Resize
(
2
));
});
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