Transform the rectangle rect defined in the client coordinate system to the local coordinate system.

var bcr = paper.svg.getBoundingClientRect();
var localRect1 = paper.clientToLocalRect({ x: bcr.left, y:, width: bcr.width, height: bcr.height });
// alternative method signature
var localRect2 = paper.clientToLocalRect(bcr.left,, bcr.width, bcr.height);
// Move the element to the center of the paper viewport.
var localCenter =;
var elSize = element.size();
element.position(localCenter.x - elSize.width, localCenter.y - elSize.height);