File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -429,15 +429,13 @@ class AnnotationLayer extends React.Component<
429
429
)
430
430
} else {
431
431
//Handle when style or other attributes change
432
- adjustedAnnotations = adjustedAnnotations . map ( ( d : NoteType , i ) => {
433
- const newNoteData = Object . assign (
434
- adjustableAnnotations [ i ] . props . noteData ,
435
- {
436
- nx : d . props . noteData . nx ,
437
- ny : d . props . noteData . ny ,
438
- note : d . props . noteData . note
439
- }
440
- )
432
+ adjustedAnnotations = adjustableAnnotations . map ( ( d : NoteType , i ) => {
433
+ const oldAnnotation = adjustedAnnotations [ i ] as NoteType
434
+ const newNoteData = {
435
+ ...oldAnnotation . props . noteData ,
436
+ ...d . props . noteData
437
+ }
438
+
441
439
return < Annotation key = { d . key } noteData = { newNoteData } />
442
440
} )
443
441
}
You can’t perform that action at this time.
0 commit comments