openpdu/static/bower_components/jvectormap/lib/vector-canvas.js

16 lines
473 B
JavaScript
Raw Normal View History

2020-12-23 09:11:11 +00:00
/**
* Class for vector images manipulations.
* @constructor
* @param {DOMElement} container to place canvas to
* @param {Number} width
* @param {Number} height
*/
jvm.VectorCanvas = function(container, width, height) {
this.mode = window.SVGAngle ? 'svg' : 'vml';
if (this.mode == 'svg') {
this.impl = new jvm.SVGCanvasElement(container, width, height);
} else {
this.impl = new jvm.VMLCanvasElement(container, width, height);
}
return this.impl;
};