looks like there is code copied from the magnifier addon here