I know it's could be calculated by putting all the transform related css properties from the dom hierarchy in some robust equation, but i'm not a math genius. Do you know any solution for this problem?
Asked
Active
Viewed 769 times
0
-
if you have the transform matrix of the owner object `M` then just multiply point in GCS and `M` inverse ... `LCS=Inverse(M)*GCS` and reverse `GCS=M*LCS` ... GCS means point in global coordinate system and you can quess what LCS means ... some system uses reverse multiplication order so if it does not work then do `LCS=GCS*Inverse(M)` instead – Spektre Nov 27 '14 at 15:11
-
Regards the plenty of other transform related css values like perspective, perspective-origin, transform, transform-origin, transform-style and the possible long dom hierarchy under the selected element with the variate of these values, it's not that easy:( – mantramantramantra Nov 28 '14 at 09:02
-
if you can convert LCS to GCS then it is easy ... just convert basis vectors (one per each axis) and point (0,0,0) and from the result construct the transform matrix like this: http://stackoverflow.com/a/25216549/2521214 if you can not then the only option is to find some function inside API you are use for DOM hierarchy access – Spektre Nov 28 '14 at 15:43