isEnabled ? GridManager.enablePan() : GridManager.disablePan();

up to you, here it is readable, if you want you can change it