Changes to getPos() to get the position of an element in relation to its parent.