PHP Classes

File: vendors/gentelella/vendors/jqvmap/src/VectorCanvas/setSize.js

Recommend this page to a friend!
  Classes of Jorge Castro   Gentelella BladeOne   vendors/gentelella/vendors/jqvmap/src/VectorCanvas/setSize.js   Download  
File: vendors/gentelella/vendors/jqvmap/src/VectorCanvas/setSize.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Gentelella BladeOne
Render templates using Bootstrap for presentation
Author: By
Last change:
Date: 3 years ago
Size: 880 bytes
 

Contents

Class file image Download
VectorCanvas.prototype.setSize = function (width, height) { if (this.mode === 'svg') { this.canvas.setAttribute('width', width); this.canvas.setAttribute('height', height); } else { this.canvas.style.width = width + 'px'; this.canvas.style.height = height + 'px'; this.canvas.coordsize = width + ' ' + height; this.canvas.coordorigin = '0 0'; if (this.rootGroup) { var paths = this.rootGroup.getElementsByTagName('shape'); for (var 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'; } this.rootGroup.coordsize = width + ' ' + height; this.rootGroup.style.width = width + 'px'; this.rootGroup.style.height = height + 'px'; } } this.width = width; this.height = height; };