VMLRenderer.js
1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/**
* (c) 2010-2018 Torstein Honsi
*
* License: www.highcharts.com/license
*/
'use strict';
import H from '../parts/Globals.js';
import '../parts/Utilities.js';
import '../parts/Axis.js';
import '../parts/SvgRenderer.js';
var addEvent = H.addEvent,
Axis = H.Axis,
SVGRenderer = H.SVGRenderer,
VMLRenderer = H.VMLRenderer;
/**
* Extension to the VML Renderer
*/
if (VMLRenderer) {
H.setOptions({ animate: false });
VMLRenderer.prototype.face3d = SVGRenderer.prototype.face3d;
VMLRenderer.prototype.polyhedron = SVGRenderer.prototype.polyhedron;
VMLRenderer.prototype.cuboid = SVGRenderer.prototype.cuboid;
VMLRenderer.prototype.cuboidPath = SVGRenderer.prototype.cuboidPath;
VMLRenderer.prototype.toLinePath = SVGRenderer.prototype.toLinePath;
VMLRenderer.prototype.toLineSegments = SVGRenderer.prototype.toLineSegments;
VMLRenderer.prototype.createElement3D =
SVGRenderer.prototype.createElement3D;
VMLRenderer.prototype.arc3d = function (shapeArgs) {
var result = SVGRenderer.prototype.arc3d.call(this, shapeArgs);
result.css({ zIndex: result.zIndex });
return result;
};
H.VMLRenderer.prototype.arc3dPath = H.SVGRenderer.prototype.arc3dPath;
addEvent(Axis, 'render', function () {
// VML doesn't support a negative z-index
if (this.sideFrame) {
this.sideFrame.css({ zIndex: 0 });
this.sideFrame.front.attr({ fill: this.sideFrame.color });
}
if (this.bottomFrame) {
this.bottomFrame.css({ zIndex: 1 });
this.bottomFrame.front.attr({ fill: this.bottomFrame.color });
}
if (this.backFrame) {
this.backFrame.css({ zIndex: 0 });
this.backFrame.front.attr({ fill: this.backFrame.color });
}
});
}