Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
unsatisfiableness
/
webpanel
/
js
/
jqvmap
/
jqvmap-master
/
src
/
VectorCanvas
:
setSize.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
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; };