Skip to content

Commit 5806d1b

Browse files
committed
Bump version for 2.0.0 release and updated package
1 parent 64a28f2 commit 5806d1b

File tree

3 files changed

+42
-14
lines changed

3 files changed

+42
-14
lines changed

dist/react-fusioncharts.js

Lines changed: 40 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ return /******/ (function(modules) { // webpackBootstrap
108108

109109
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
110110

111+
var staticEvents = ['ready', 'beforeinitialize', 'initialized'];
112+
111113
var ReactFC = function (_React$Component) {
112114
_inherits(ReactFC, _React$Component);
113115

@@ -119,7 +121,11 @@ return /******/ (function(modules) { // webpackBootstrap
119121
}
120122

121123
modules.forEach(function (m) {
122-
m(core);
124+
if (m.getName || m.name) {
125+
core.addDep(m);
126+
} else {
127+
m(core);
128+
}
123129
});
124130
ReactFC.fusionChartsCore = core;
125131
}
@@ -329,12 +335,31 @@ return /******/ (function(modules) { // webpackBootstrap
329335
}, {
330336
key: 'renderChart',
331337
value: function renderChart() {
338+
var _this4 = this;
339+
332340
var currentOptions = this.resolveChartOptions(this.props);
333341
currentOptions.renderAt = this.containerId;
334342

335343
this.chartObj = new this.FusionCharts(currentOptions);
344+
Object.keys(this.props).forEach(function (value) {
345+
var event = value.match(/^fcEvent-.*/i);
346+
347+
if (event && typeof _this4.props[value] === 'function') {
348+
var eventName = value.replace(/^fcEvent-/i, '');
349+
350+
if (staticEvents.indexOf(eventName.toLowerCase()) > -1) {
351+
_this4.FusionCharts.addEventListener(eventName, _this4.props[value]);
352+
} else {
353+
_this4.chartObj.addEventListener(eventName, _this4.props[value]);
354+
}
355+
}
356+
});
336357
this.chartObj.render();
337358
this.oldOptions = currentOptions;
359+
360+
if (this.props.onRender && typeof this.props.onRender === 'function') {
361+
this.props.onRender(this.chartObj);
362+
}
338363
}
339364
}, {
340365
key: 'resolveChartOptions',
@@ -425,9 +450,11 @@ return /******/ (function(modules) { // webpackBootstrap
425450
// and inconsistent support for the `crypto` API. We do the best we can via
426451
// feature-detection
427452

428-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
429-
var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues.bind(crypto)) ||
430-
(typeof(msCrypto) != 'undefined' && msCrypto.getRandomValues.bind(msCrypto));
453+
// getRandomValues needs to be invoked in a context where "this" is a Crypto
454+
// implementation. Also, find the complete implementation of crypto on IE11.
455+
var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
456+
(typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));
457+
431458
if (getRandomValues) {
432459
// WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
433460
var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
@@ -470,14 +497,15 @@ return /******/ (function(modules) { // webpackBootstrap
470497
function bytesToUuid(buf, offset) {
471498
var i = offset || 0;
472499
var bth = byteToHex;
473-
return bth[buf[i++]] + bth[buf[i++]] +
474-
bth[buf[i++]] + bth[buf[i++]] + '-' +
475-
bth[buf[i++]] + bth[buf[i++]] + '-' +
476-
bth[buf[i++]] + bth[buf[i++]] + '-' +
477-
bth[buf[i++]] + bth[buf[i++]] + '-' +
478-
bth[buf[i++]] + bth[buf[i++]] +
479-
bth[buf[i++]] + bth[buf[i++]] +
480-
bth[buf[i++]] + bth[buf[i++]];
500+
// join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
501+
return ([bth[buf[i++]], bth[buf[i++]],
502+
bth[buf[i++]], bth[buf[i++]], '-',
503+
bth[buf[i++]], bth[buf[i++]], '-',
504+
bth[buf[i++]], bth[buf[i++]], '-',
505+
bth[buf[i++]], bth[buf[i++]], '-',
506+
bth[buf[i++]], bth[buf[i++]],
507+
bth[buf[i++]], bth[buf[i++]],
508+
bth[buf[i++]], bth[buf[i++]]]).join('');
481509
}
482510

483511
module.exports = bytesToUuid;

0 commit comments

Comments
 (0)