Sha256: fb69ae758b80611a54a93c02f209c99e3872bb992aa26ae852d6f4e15c9c9b21

Contents?: true

Size: 776 Bytes

Versions: 4

Compression:

Stored size: 776 Bytes

Contents

jvm.SVGCanvasElement = function(container, width, height){
  this.classPrefix = 'SVG';
  jvm.SVGCanvasElement.parentClass.call(this, 'svg');
  jvm.AbstractCanvasElement.apply(this, arguments);
}

jvm.inherits(jvm.SVGCanvasElement, jvm.SVGElement);
jvm.mixin(jvm.SVGCanvasElement, jvm.AbstractCanvasElement);

jvm.SVGCanvasElement.prototype.setSize = function(width, height){
  this.width = width;
  this.height = height;
  this.node.setAttribute('width', width);
  this.node.setAttribute('height', height);
};

jvm.SVGCanvasElement.prototype.applyTransformParams = function(scale, transX, transY) {
  this.scale = scale;
  this.transX = transX;
  this.transY = transY;
  this.rootElement.node.setAttribute('transform', 'scale('+scale+') translate('+transX+', '+transY+')');
};

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
jvectormap-rails-1.0.1 vendor/assets/javascripts/jvectormap/lib/svg-canvas-element.js
jvectormap-rails4-1.0.1 vendor/assets/javascripts/jvectormap/lib/svg-canvas-element.js
jvectormap-rails4-1.0.0 vendor/assets/javascripts/jvectormap/lib/svg-canvas-element.js
jvectormap-rails-1.0.0 vendor/assets/javascripts/jvectormap/lib/svg-canvas-element.js