From 6fcfb7c04d32e1c8b26a312295bf7ac3ec2d2ad7 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 13 Jul 2018 19:06:45 +0200 Subject: Fixed many permissions and began admin interface --- .../jvectormap/src/vml-path-element.js | 98 ++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 public/bower_components/jvectormap/src/vml-path-element.js (limited to 'public/bower_components/jvectormap/src/vml-path-element.js') diff --git a/public/bower_components/jvectormap/src/vml-path-element.js b/public/bower_components/jvectormap/src/vml-path-element.js new file mode 100644 index 0000000..6bd9911 --- /dev/null +++ b/public/bower_components/jvectormap/src/vml-path-element.js @@ -0,0 +1,98 @@ +jvm.VMLPathElement = function(config, style){ + var scale = new jvm.VMLElement('skew'); + + jvm.VMLPathElement.parentClass.call(this, 'shape', config, style); + + this.node.coordorigin = "0 0"; + + scale.node.on = true; + scale.node.matrix = '0.01,0,0,0.01,0,0'; + scale.node.offset = '0,0'; + + this.node.appendChild(scale.node); +}; + +jvm.inherits(jvm.VMLPathElement, jvm.VMLShapeElement); + +jvm.VMLPathElement.prototype.applyAttr = function(attr, value){ + if (attr === 'd') { + this.node.path = jvm.VMLPathElement.pathSvgToVml(value); + } else { + jvm.VMLShapeElement.prototype.applyAttr.call(this, attr, value); + } +}; + +jvm.VMLPathElement.pathSvgToVml = function(path) { + var cx = 0, cy = 0, ctrlx, ctrly; + + path = path.replace(/(-?\d+)e(-?\d+)/g, '0'); + return path.replace(/([MmLlHhVvCcSs])\s*((?:-?\d*(?:\.\d+)?\s*,?\s*)+)/g, function(segment, letter, coords, index){ + coords = coords.replace(/(\d)-/g, '$1,-') + .replace(/^\s+/g, '') + .replace(/\s+$/g, '') + .replace(/\s+/g, ',').split(','); + if (!coords[0]) coords.shift(); + for (var i=0, l=coords.length; i