@@ -523,7 +523,9 @@ export default class VideoMapDraw {
523523 this . features . push ( feature ) ;
524524 this . _setSelectedIds ( [ feature . id ] ) ;
525525 this . _syncResult ( ) ;
526- this . videoMap . fire ( 'drawcreate' , { feature, data : this . getData ( ) } ) ;
526+ const eventFeature = Object . assign ( { } , feature ) ;
527+ delete eventFeature . id ;
528+ this . videoMap . fire ( 'drawcreate' , { feature : eventFeature , data : this . getData ( ) } ) ;
527529 this . _emitModeChange ( ) ;
528530 this . _emitUpdate ( ) ;
529531 this . _showMeasureLabels ( feature ) ;
@@ -760,7 +762,7 @@ export default class VideoMapDraw {
760762 return {
761763 type : 'Feature' ,
762764 id,
763- properties : { drawType : type , id } ,
765+ properties : { } ,
764766 geometry : { type, coordinates }
765767 } ;
766768 }
@@ -825,15 +827,15 @@ export default class VideoMapDraw {
825827 features . push ( {
826828 type : 'Feature' ,
827829 id : `videomap-draw-draft-p${ index } ` ,
828- properties : { drawType : 'Point' , draft : true } ,
830+ properties : { draft : true } ,
829831 geometry : { type : 'Point' , coordinates : coord }
830832 } ) ;
831833 } ) ;
832834 if ( this . mode === 'LineString' && vertices . length >= 2 ) {
833835 features . push ( {
834836 type : 'Feature' ,
835837 id : 'videomap-draw-draft-line' ,
836- properties : { drawType : 'LineString' , draft : true } ,
838+ properties : { draft : true } ,
837839 geometry : { type : 'LineString' , coordinates : vertices }
838840 } ) ;
839841 }
@@ -842,14 +844,14 @@ export default class VideoMapDraw {
842844 features . push ( {
843845 type : 'Feature' ,
844846 id : 'videomap-draw-draft-polygon' ,
845- properties : { drawType : 'Polygon' , draft : true } ,
847+ properties : { draft : true } ,
846848 geometry : { type : 'Polygon' , coordinates : [ vertices . concat ( [ vertices [ 0 ] ] ) ] }
847849 } ) ;
848850 } else {
849851 features . push ( {
850852 type : 'Feature' ,
851853 id : 'videomap-draw-draft-line' ,
852- properties : { drawType : 'LineString' , draft : true } ,
854+ properties : { draft : true } ,
853855 geometry : { type : 'LineString' , coordinates : vertices }
854856 } ) ;
855857 }
0 commit comments