title: How to get the element position after css-translation
body: <p>I wrote an angularJS directive for dragging elements, therefore I have a mousemove-handler:</p>
  
  <pre><code>function mousemove($event) {
              var x = startX + $event.clientX - initialMouseX;
              var y = startY + $event.clientY - initialMouseY;
              var maxX = window.innerWidth - elm.prop('offsetWidth');
              var maxY = window.innerHeight - elm.prop('offsetHeight');
              x = (x &lt; maxX) ? x : maxX;
              y = (y &lt; maxY) ? y : maxY;
              elm.css({
                  top: y + 'px',
                  left: x + 'px'
              });
              return false;
          }
  </code></pre>
  
  <p>I don´t want to drop the element out of the window. Therefore I want to use the variables maxX and maxY. But what can I do, if the element is css-translated like this:</p>
  
  <pre><code>.my-element {
      position: absolute;
      left: 50%;
      top: 50%;
      width: 50%;
      transform: translate(-50%, -50%);
  }
  </code></pre>