corrade-nucleus-nucleons – Diff between revs 1 and 11

Subversion Repositories:
Rev:
Only display areas with differencesIgnore whitespace
Rev 1 Rev 11
1 /** 1 /**
2 * @license Highcharts JS v5.0.10 (2017-03-31) 2 * @license Highcharts JS v5.0.12 (2017-05-24)
3 * StaticScale 3 * StaticScale
4 * 4 *
5 * (c) 2016 Torstein Honsi, Lars A. V. Cabrera 5 * (c) 2016 Torstein Honsi, Lars A. V. Cabrera
6 * 6 *
7 * --- WORK IN PROGRESS --- 7 * --- WORK IN PROGRESS ---
8 * 8 *
9 * License: www.highcharts.com/license 9 * License: www.highcharts.com/license
10 */ 10 */
11 'use strict'; 11 'use strict';
12 (function(factory) { 12 (function(factory) {
13 if (typeof module === 'object' && module.exports) { 13 if (typeof module === 'object' && module.exports) {
14 module.exports = factory; 14 module.exports = factory;
15 } else { 15 } else {
16 factory(Highcharts); 16 factory(Highcharts);
17 } 17 }
18 }(function(Highcharts) { 18 }(function(Highcharts) {
19 (function(H) { 19 (function(H) {
20 /** 20 /**
21 * (c) 2017 Torstein Honsi, Lars Cabrera 21 * (c) 2017 Torstein Honsi, Lars Cabrera
22 * 22 *
23 * License: www.highcharts.com/license 23 * License: www.highcharts.com/license
24 */ 24 */
25   25  
26 var Chart = H.Chart, 26 var Chart = H.Chart,
27 each = H.each, 27 each = H.each,
28 pick = H.pick; 28 pick = H.pick;
29   29  
30 Chart.prototype.adjustHeight = function() { 30 Chart.prototype.adjustHeight = function() {
31 each(this.axes, function(axis) { 31 each(this.axes, function(axis) {
32 var chart = axis.chart, 32 var chart = axis.chart,
33 animate = !!chart.initiatedScale && chart.options.animation, 33 animate = !!chart.initiatedScale && chart.options.animation,
34 staticScale = axis.options.staticScale, 34 staticScale = axis.options.staticScale,
35 height, 35 height,
36 diff; 36 diff;
37 if ( 37 if (
38 H.isNumber(staticScale) && 38 H.isNumber(staticScale) &&
39 !axis.horiz && 39 !axis.horiz &&
40 H.defined(axis.min) 40 H.defined(axis.min)
41 ) { 41 ) {
42 height = pick( 42 height = pick(
43 axis.unitLength, 43 axis.unitLength,
44 axis.max + axis.tickInterval - axis.min 44 axis.max + axis.tickInterval - axis.min
45 ) * staticScale; 45 ) * staticScale;
46   46  
47 // Minimum height is 1 x staticScale. 47 // Minimum height is 1 x staticScale.
48 height = Math.max(height, staticScale); 48 height = Math.max(height, staticScale);
49   49  
50 diff = height - chart.plotHeight; 50 diff = height - chart.plotHeight;
51   51  
52 if (Math.abs(diff) >= 1) { 52 if (Math.abs(diff) >= 1) {
53 chart.plotHeight = height; 53 chart.plotHeight = height;
54 chart.setSize(null, chart.chartHeight + diff, animate); 54 chart.setSize(null, chart.chartHeight + diff, animate);
55 } 55 }
56 } 56 }
57   57  
58 }); 58 });
59 this.initiatedScale = true; 59 this.initiatedScale = true;
60 }; 60 };
61 H.addEvent(Chart.prototype, 'render', Chart.prototype.adjustHeight); 61 H.addEvent(Chart.prototype, 'render', Chart.prototype.adjustHeight);
62   62  
63 }(Highcharts)); 63 }(Highcharts));
64 })); 64 }));
65   65