plugins/sigma.plugins.dragNodes/sigma.plugins.dragNodes.js
function calculateOffset(element) {
      var style = window.getComputedStyle(element);
      var getCssProperty = function(prop) {
        return parseInt(style.getPropertyValue(prop).replace('px', '')) || 0;
      };
      return {
        left: element.getBoundingClientRect().left + getCssProperty('padding-left'),
        top: element.getBoundingClientRect().top + getCssProperty('padding-top')
      };
    }
function calculateOffset(element) {
      var style = window.getComputedStyle(element);
      var getCssProperty = function(prop) {
        return parseInt(style.getPropertyValue(prop).replace('px', '')) || 0;
      };
      return {
        left: element.getBoundingClientRect().left + getCssProperty('padding-left'),
        top: element.getBoundingClientRect().top + getCssProperty('padding-top')
      };
    }
function calculateOffset ( element ) { var style = window . getComputedStyle ( element ) ; var getCssProperty = function ( prop ) { return parseInt ( style . getPropertyValue ( prop ) . replace ( 'px' , '' ) ) || 0 ; } ; return { left : element . getBoundingClientRect ( ) . left + getCssProperty ( 'padding-left' ) , top : element . getBoundingClientRect ( ) . top + getCssProperty ( 'padding-top' ) } ; }
Calculates the global offset of the given element more accurately than element.offsetTop and element.offsetLeft.
Calculates the global offset of the given element more accurately than element . offsetTop and element . offsetLeft .