diff options
author | Marvin Borner | 2018-07-13 19:06:45 +0200 |
---|---|---|
committer | Marvin Borner | 2018-07-13 19:06:45 +0200 |
commit | 6fcfb7c04d32e1c8b26a312295bf7ac3ec2d2ad7 (patch) | |
tree | dbc87ef16fa01d5d99116de283592b8fe5e02944 /public/bower_components/jvectormap/src/vml-canvas-element.js | |
parent | dfd839f27146df0ad0494e11734fc7d310c70ebf (diff) |
Fixed many permissions and began admin interface
Diffstat (limited to 'public/bower_components/jvectormap/src/vml-canvas-element.js')
-rw-r--r-- | public/bower_components/jvectormap/src/vml-canvas-element.js | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/public/bower_components/jvectormap/src/vml-canvas-element.js b/public/bower_components/jvectormap/src/vml-canvas-element.js new file mode 100644 index 0000000..79e203a --- /dev/null +++ b/public/bower_components/jvectormap/src/vml-canvas-element.js @@ -0,0 +1,45 @@ +jvm.VMLCanvasElement = function(container, width, height){ + this.classPrefix = 'VML'; + jvm.VMLCanvasElement.parentClass.call(this, 'group'); + jvm.AbstractCanvasElement.apply(this, arguments); + this.node.style.position = 'absolute'; +}; + +jvm.inherits(jvm.VMLCanvasElement, jvm.VMLElement); +jvm.mixin(jvm.VMLCanvasElement, jvm.AbstractCanvasElement); + +jvm.VMLCanvasElement.prototype.setSize = function(width, height){ + var paths, + groups, + i, + l; + + this.width = width; + this.height = height; + this.node.style.width = width + "px"; + this.node.style.height = height + "px"; + this.node.coordsize = width+' '+height; + this.node.coordorigin = "0 0"; + if (this.rootElement) { + paths = this.rootElement.node.getElementsByTagName('shape'); + for(i = 0, l = paths.length; i < l; i++) { + paths[i].coordsize = width+' '+height; + paths[i].style.width = width+'px'; + paths[i].style.height = height+'px'; + } + groups = this.node.getElementsByTagName('group'); + for(i = 0, l = groups.length; i < l; i++) { + groups[i].coordsize = width+' '+height; + groups[i].style.width = width+'px'; + groups[i].style.height = height+'px'; + } + } +}; + +jvm.VMLCanvasElement.prototype.applyTransformParams = function(scale, transX, transY) { + this.scale = scale; + this.transX = transX; + this.transY = transY; + this.rootElement.node.coordorigin = (this.width-transX-this.width/100)+','+(this.height-transY-this.height/100); + this.rootElement.node.coordsize = this.width/scale+','+this.height/scale; +};
\ No newline at end of file |