Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
c3-closed
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Evgeny
c3-closed
Commits
3b4e916a
Commit
3b4e916a
authored
Nov 08, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop interval when destory() called - #668
parent
afe83971
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
4 deletions
+10
-4
c3.js
c3.js
+5
-2
c3.min.js
c3.min.js
+0
-0
api.chart.js
src/api.chart.js
+1
-0
core.js
src/core.js
+4
-2
No files found.
c3.js
View file @
3b4e916a
...
...
@@ -138,6 +138,8 @@
$$
.
withoutFadeIn
=
{};
$$
.
intervalForObserveInserted
=
undefined
;
$$
.
axes
.
subx
=
d3
.
selectAll
([]);
// needs when excluding subchart.js
};
...
...
@@ -805,10 +807,10 @@
if
(
mutation
.
type
===
'childList'
&&
mutation
.
previousSibling
)
{
observer
.
disconnect
();
// need to wait for completion of load because size calculation requires the actual sizes determined after that completion
var
interval
=
window
.
setInterval
(
function
()
{
$$
.
intervalForObserveInserted
=
window
.
setInterval
(
function
()
{
// parentNode will NOT be null when completed
if
(
selection
.
node
().
parentNode
)
{
window
.
clearInterval
(
interval
);
window
.
clearInterval
(
$$
.
intervalForObserveInserted
);
$$
.
updateDimension
();
$$
.
config
.
oninit
.
call
(
$$
);
$$
.
redraw
({
...
...
@@ -6319,6 +6321,7 @@
$$
.
data
.
targets
=
undefined
;
$$
.
data
.
xs
=
{};
$$
.
selectChart
.
classed
(
'c3'
,
false
).
html
(
""
);
window
.
clearInterval
(
$$
.
intervalForObserveInserted
);
window
.
onresize
=
null
;
};
...
...
c3.min.js
View file @
3b4e916a
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/api.chart.js
View file @
3b4e916a
...
...
@@ -15,5 +15,6 @@ c3_chart_fn.destroy = function () {
$$
.
data
.
targets
=
undefined
;
$$
.
data
.
xs
=
{};
$$
.
selectChart
.
classed
(
'c3'
,
false
).
html
(
""
);
window
.
clearInterval
(
$$
.
intervalForObserveInserted
);
window
.
onresize
=
null
;
};
src/core.js
View file @
3b4e916a
...
...
@@ -133,6 +133,8 @@ c3_chart_internal_fn.initParams = function () {
$$
.
withoutFadeIn
=
{};
$$
.
intervalForObserveInserted
=
undefined
;
$$
.
axes
.
subx
=
d3
.
selectAll
([]);
// needs when excluding subchart.js
};
...
...
@@ -800,10 +802,10 @@ c3_chart_internal_fn.observeInserted = function (selection) {
if
(
mutation
.
type
===
'childList'
&&
mutation
.
previousSibling
)
{
observer
.
disconnect
();
// need to wait for completion of load because size calculation requires the actual sizes determined after that completion
var
interval
=
window
.
setInterval
(
function
()
{
$$
.
intervalForObserveInserted
=
window
.
setInterval
(
function
()
{
// parentNode will NOT be null when completed
if
(
selection
.
node
().
parentNode
)
{
window
.
clearInterval
(
interval
);
window
.
clearInterval
(
$$
.
intervalForObserveInserted
);
$$
.
updateDimension
();
$$
.
config
.
oninit
.
call
(
$$
);
$$
.
redraw
({
...
...
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