This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var domKiller = { | |
hiddenElements: [], | |
activated: false, | |
/** | |
* Initialize and activate the remove action when clicking simultaneously on left and middle mouse button and the hide action when clicking on the left mouse button | |
*/ | |
init: function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Object containing methods to animate DOM elements | |
* | |
* @type {{rotate: animator.rotate, moveY: animator.moveY, moveX: animator.moveX}} | |
*/ | |
var animator = { | |
/** | |
* Rotate a DOM element using CSS property transform and the deg unit | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Calcul l'azimut entre 2 points de coordonnées géographiques connues | |
* @param lat1 la latitude du point 1 | |
* @param lng1 la longitude du point 1 | |
* @param lat2 la latitude du point 2 | |
* @param lng2 la longitude du point 2 | |
* @return l'azimut en degrés (en anglais azimuth) | |
*/ | |
function calculateAzimuth(lat1, lng1, lat2, lng2) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Retourne la distance entre 2 points avec des coordonnées géographiques en mètres ou kilomètres | |
* @param lat1 la latitude du point 1 | |
* @param lng1 la longitude du point 1 | |
* @param lat2 la latitude du point 2 | |
* @param lng2 la longitude du point 2 | |
* @param [unit] 'k' pour un résultat en kilomètre | |
* @return la distance en mètres ou kilomètres | |
*/ | |
function calculateDistanceLatLng(lat1, lng1, lat2, lng2, unit = 'm') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create a DOM element if it does not exist already | |
* | |
* @param {String} id the id of the element | |
* @param {String} eltTag HTML tag of the element | |
* @param {String} txtContent = '' the content of the element | |
* @return {DOM element} the DOM element | |
*/ | |
function createOrGetElementById(id, eltTag, txtContent = '') { |
NewerOlder