importDrawRectanglefrom'mapbox-gl-draw-rectangle-mode';constmodes=MapboxDraw.modes;modes.draw_rectangle=DrawRectangle;constdraw=newMapboxDraw({modes:modes});draw.changeMode('draw_rectangle'); Once a rectangle is created, 1 event is fired: ...