Use hideEdgeUI and showEdgeUI translations instead of element.style.top and element.style.bottom
Refactor.
closes #367
closes #395