added handlers on sensor, and the switch sensor orientation option in edit mode only