PHP Classes

File: vendors/gentelella/vendors/jqvmap/src/JQVMap/positionPins.js

Recommend this page to a friend!
  Classes of Jorge Castro   Gentelella BladeOne   vendors/gentelella/vendors/jqvmap/src/JQVMap/positionPins.js   Download  
File: vendors/gentelella/vendors/jqvmap/src/JQVMap/positionPins.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: 646 bytes
 

Contents

Class file image Download
JQVMap.prototype.positionPins = function(){ var map = this; var pins = this.container.find('.jqvmap-pin'); jQuery.each(pins, function(index, pinObj){ pinObj = jQuery(pinObj); var countryId = map.getCountryId(pinObj.attr('for').toLowerCase()); var countryObj = jQuery('#' + countryId); var bbox = document.getElementById(countryId).getBBox(); var position = countryObj.position(); var scale = map.scale; var left = position.left + (bbox.width / 2) * scale - pinObj.width() / 2, top = position.top + (bbox.height / 2) * scale - pinObj.height() / 2; pinObj.css('left', left).css('top', top); }); };