Added the scaleFactorForElement() method.