app/assets/javascripts/highcharts/modules/drilldown.js in highcharts-rails-4.1.9 vs app/assets/javascripts/highcharts/modules/drilldown.js in highcharts-rails-4.1.10

- old
+ new

@@ -1,18 +1,22 @@ /** - * Highcharts Drilldown plugin + * Highcharts Drilldown module * * Author: Torstein Honsi - * License: MIT License + * License: www.highcharts.com/license * - * Demo: http://jsfiddle.net/highcharts/Vf3yT/ */ -/*global Highcharts,HighchartsAdapter*/ -(function (H) { +(function (factory) { + if (typeof module === 'object' && module.exports) { + module.exports = factory; + } else { + factory(Highcharts); + } +}(function (H) { - "use strict"; + 'use strict'; var noop = function () {}, defaultOptions = H.getOptions(), each = H.each, extend = H.extend, @@ -22,12 +26,12 @@ Chart = H.Chart, seriesTypes = H.seriesTypes, PieSeries = seriesTypes.pie, ColumnSeries = seriesTypes.column, Tick = H.Tick, - fireEvent = HighchartsAdapter.fireEvent, - inArray = HighchartsAdapter.inArray, + fireEvent = H.fireEvent, + inArray = H.inArray, ddSeriesId = 1; // Utilities /* * Return an intermediate color between two colors, according to pos where 0 @@ -40,11 +44,11 @@ var hasAlpha, ret; // Unsupported color, return to-color (#3920) if (!to.rgba.length || !from.rgba.length) { - ret = to.raw || 'none'; + ret = to.input || 'none'; // Interpolate } else { from = from.rgba; to = to.rgba; @@ -59,11 +63,11 @@ } /** * Handle animation of the color attributes directly */ each(['fill', 'stroke'], function (prop) { - HighchartsAdapter.addAnimSetter(prop, function (fx) { + H.addAnimSetter(prop, function (fx) { fx.elem.attr(prop, tweenColors(H.Color(fx.start), H.Color(fx.end), fx.pos)); }); }); // Add language @@ -708,6 +712,6 @@ if (seriesTypes[type].prototype.supportsDrilldown) { wrap(seriesTypes[type].prototype, 'drawTracker', drawTrackerWrapper); } } -}(Highcharts)); +}));