Compute the 4 vertices a
,b
,c
,d
absolute coordinates of any, deep, transform
ed, position
ed DOM element.
a b
+--------------+
| |
| el |
| |
+--------------+
d c
var el = document.getElementById('foo');
var v = domvertices(el);
console.log(v);
outputs:
{
a: {x: , y: , z: },
b: {x: , y: , z: },
c: {x: , y: , z: },
d: {x: , y: , z: }
}
var $el = $('#foo');
var v = $el.domvertices();
console.log(v);
you can also trace
vertices for debug purpose:
v.update().trace();
or remove the trace:
v.erase();
https://code.jquery.com/jquery-3.3.1.js