Updated panToElement and panToCenterOnRect to use an opts object to contain the non-callback arguments and added support for a scale opt.