working on map2 js, encountering error: object drag has no method apply