PROV-278 Fix js error that stopped panning in certain cases