This file contains 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
/*** Git configuration in eclipse ***/ | |
/* Setup */ | |
- In Preferences > Team > Git > Label Decorations > Icon Decorations => check all | |
- In Git perspective > Synchronize button > Synchronize => synchronize git destination .../origin/master | |
- In Preferences > Team > Perspective => Change "Team Synchronize" to "Git" | |
/*************************************************************************************************/ |
This file contains 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
/** | |
* @description Gets the coordinates of the mouse click on given element (x, y) | |
* @param {string} elementClass class name of the element | |
*/ | |
function getElementClickOriginPoint(elementClass) { | |
document.querySelector(`.${elementClass}`).onclick = function(e) { | |
var rect = e.target.getBoundingClientRect(); | |
var x = e.clientX - rect.left; // x position within the element. | |
var y = e.clientY - rect.top; // y position within the element. | |
console.log(x, y); |
OlderNewer