Skip to content

Commit

Permalink
chore(version): bump to v0.6.9
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k committed Nov 22, 2018
1 parent 9f54601 commit 8cde80e
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .bmp.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
version: 0.6.8
version: 0.6.9
commit: 'chore(version): bump to v%.%.%'
files:
src/core.js: 'version: "%.%.%"'
Expand Down
67 changes: 45 additions & 22 deletions c3.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* @license C3.js v0.6.8 | (c) C3 Team and other contributors | http://c3js.org/ */
/* @license C3.js v0.6.9 | (c) C3 Team and other contributors | http://c3js.org/ */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
Expand Down Expand Up @@ -1147,7 +1147,7 @@
};

var c3 = {
version: "0.6.8",
version: "0.6.9",
chart: {
fn: Chart.prototype,
internal: {
Expand Down Expand Up @@ -1449,10 +1449,12 @@
withUpdateOrgXDomain: true,
withTransitionForAxis: false
});
} // Bind resize event
} // Bind to resize event


$$.bindResize(); // export element of the chart
$$.bindResize(); // Bind to window focus event

$$.bindWindowFocus(); // export element of the chart

$$.api.element = $$.selectChart.node();
};
Expand Down Expand Up @@ -2095,6 +2097,10 @@
characterData: true
});
};
/**
* Binds handlers to the window resize event.
*/


ChartInternal.prototype.bindResize = function () {
var $$ = this,
Expand Down Expand Up @@ -2171,6 +2177,34 @@
};
}
};
/**
* Binds handlers to the window focus event.
*/


ChartInternal.prototype.bindWindowFocus = function () {
var _this = this;

if (this.windowFocusHandler) {
// The handler is already set
return;
}

this.windowFocusHandler = function () {
_this.redraw();
};

window.addEventListener('focus', this.windowFocusHandler);
};
/**
* Unbinds from the window focus event.
*/


ChartInternal.prototype.unbindWindowFocus = function () {
window.removeEventListener('focus', this.windowFocusHandler);
delete this.windowFocusHandler;
};

ChartInternal.prototype.generateResize = function () {
var resizeFunctions = [];
Expand Down Expand Up @@ -2265,20 +2299,7 @@
};

ChartInternal.prototype.isTabVisible = function () {
var hidden;

if (typeof document.hidden !== "undefined") {
// Opera 12.10 and Firefox 18 and later support
hidden = "hidden";
} else if (typeof document.mozHidden !== "undefined") {
hidden = "mozHidden";
} else if (typeof document.msHidden !== "undefined") {
hidden = "msHidden";
} else if (typeof document.webkitHidden !== "undefined") {
hidden = "webkitHidden";
}

return document[hidden] ? false : true;
return !document.hidden;
};

ChartInternal.prototype.getPathBox = getPathBox;
Expand Down Expand Up @@ -4258,10 +4279,12 @@
if (wrapper && wrapper.add && wrapper.remove) {
wrapper.remove($$.resizeFunction);
}
} // remove the inner resize functions
} // Removes the inner resize functions


$$.resizeFunction.remove(); // Unbinds from the window focus event

$$.resizeFunction.remove();
$$.unbindWindowFocus();
$$.selectChart.classed('c3', false).html(""); // MEMO: this is needed because the reference of some elements will not be released, then memory leak will happen.

Object.keys($$).forEach(function (key) {
Expand Down Expand Up @@ -4856,8 +4879,8 @@
classes,
regions;
options = options || {};
duration = $$.getOption(options, "duration", config.transition_duration);
classes = $$.getOption(options, "classes", [CLASS.region]);
duration = getOption(options, "duration", config.transition_duration);
classes = getOption(options, "classes", [CLASS.region]);
regions = $$.main.select('.' + CLASS.regions).selectAll(classes.map(function (c) {
return '.' + c;
}));
Expand Down
4 changes: 2 additions & 2 deletions c3.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "c3",
"repo": "masayuki0812/c3",
"description": "A D3-based reusable chart library",
"version": "0.6.8",
"version": "0.6.9",
"keywords": [],
"dependencies": {
"mbostock/d3": "v5.0.0"
Expand Down
4 changes: 4 additions & 0 deletions docs/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@

%h3 Change Log
%ul
%li
<a href="https://github.com/c3js/c3/releases/tag/v0.6.9">v0.6.9</a><span class="gray">&nbsp;-&nbsp;2018-11-22</span>
%ul
%li Fix a bug.
%li
<a href="https://github.com/c3js/c3/releases/tag/v0.6.8">v0.6.8</a><span class="gray">&nbsp;-&nbsp;2018-10-01</span>
%ul
Expand Down
67 changes: 45 additions & 22 deletions docs/js/c3.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* @license C3.js v0.6.8 | (c) C3 Team and other contributors | http://c3js.org/ */
/* @license C3.js v0.6.9 | (c) C3 Team and other contributors | http://c3js.org/ */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
Expand Down Expand Up @@ -1147,7 +1147,7 @@
};

var c3 = {
version: "0.6.8",
version: "0.6.9",
chart: {
fn: Chart.prototype,
internal: {
Expand Down Expand Up @@ -1449,10 +1449,12 @@
withUpdateOrgXDomain: true,
withTransitionForAxis: false
});
} // Bind resize event
} // Bind to resize event


$$.bindResize(); // export element of the chart
$$.bindResize(); // Bind to window focus event

$$.bindWindowFocus(); // export element of the chart

$$.api.element = $$.selectChart.node();
};
Expand Down Expand Up @@ -2095,6 +2097,10 @@
characterData: true
});
};
/**
* Binds handlers to the window resize event.
*/


ChartInternal.prototype.bindResize = function () {
var $$ = this,
Expand Down Expand Up @@ -2171,6 +2177,34 @@
};
}
};
/**
* Binds handlers to the window focus event.
*/


ChartInternal.prototype.bindWindowFocus = function () {
var _this = this;

if (this.windowFocusHandler) {
// The handler is already set
return;
}

this.windowFocusHandler = function () {
_this.redraw();
};

window.addEventListener('focus', this.windowFocusHandler);
};
/**
* Unbinds from the window focus event.
*/


ChartInternal.prototype.unbindWindowFocus = function () {
window.removeEventListener('focus', this.windowFocusHandler);
delete this.windowFocusHandler;
};

ChartInternal.prototype.generateResize = function () {
var resizeFunctions = [];
Expand Down Expand Up @@ -2265,20 +2299,7 @@
};

ChartInternal.prototype.isTabVisible = function () {
var hidden;

if (typeof document.hidden !== "undefined") {
// Opera 12.10 and Firefox 18 and later support
hidden = "hidden";
} else if (typeof document.mozHidden !== "undefined") {
hidden = "mozHidden";
} else if (typeof document.msHidden !== "undefined") {
hidden = "msHidden";
} else if (typeof document.webkitHidden !== "undefined") {
hidden = "webkitHidden";
}

return document[hidden] ? false : true;
return !document.hidden;
};

ChartInternal.prototype.getPathBox = getPathBox;
Expand Down Expand Up @@ -4258,10 +4279,12 @@
if (wrapper && wrapper.add && wrapper.remove) {
wrapper.remove($$.resizeFunction);
}
} // remove the inner resize functions
} // Removes the inner resize functions


$$.resizeFunction.remove(); // Unbinds from the window focus event

$$.resizeFunction.remove();
$$.unbindWindowFocus();
$$.selectChart.classed('c3', false).html(""); // MEMO: this is needed because the reference of some elements will not be released, then memory leak will happen.

Object.keys($$).forEach(function (key) {
Expand Down Expand Up @@ -4856,8 +4879,8 @@
classes,
regions;
options = options || {};
duration = $$.getOption(options, "duration", config.transition_duration);
classes = $$.getOption(options, "classes", [CLASS.region]);
duration = getOption(options, "duration", config.transition_duration);
classes = getOption(options, "classes", [CLASS.region]);
regions = $$.main.select('.' + CLASS.regions).selectAll(classes.map(function (c) {
return '.' + c;
}));
Expand Down
4 changes: 2 additions & 2 deletions docs/js/c3.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "c3",
"version": "0.6.8",
"version": "0.6.9",
"description": "D3-based reusable chart library",
"main": "c3.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from './util';

var c3 = {
version: "0.6.8",
version: "0.6.9",
chart: {
fn: Chart.prototype,
internal: {
Expand Down

0 comments on commit 8cde80e

Please sign in to comment.