Sha256: 89853046e7763ca5bd45521b383ed902dce4727684e9f609b93cddcf346f53ac
Contents?: true
Size: 646 Bytes
Versions: 2
Compression:
Stored size: 646 Bytes
Contents
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); }); };
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails_modular_admin-1.0.0 | app/assets/node_modules/jqvmap/src/JQVMap/positionPins.js |
rails_modular_admin-0.4.0 | app/assets/node_modules/jqvmap/src/JQVMap/positionPins.js |