Conversation
I remember it is used when user drag stuff into the group, you might want to give it a test there |
I reverted to using cutouts ...and I fixed the performance by limiting the ObservableCollection notifications |
| switch (e.PropertyName) | ||
| { | ||
| case nameof(PortModel.Center): | ||
| RaisePropertyChanged(nameof(CurvePoint1)); |
There was a problem hiding this comment.
not sure if this is the right property for which to raise an event.
Does CurvePoint1 correspond to the end Node ?
I did see mentioned somewhere in the code that CurvePoint0 corresponds to the start Node.
There was a problem hiding this comment.
Looking at the Redraw function...it looks like CurvePoint3 should correspond to the end Node
| } | ||
| internal set | ||
| { | ||
| if (center.Equals(value)) return; |
|
|
||
| // Annotations always update their position relative to all nested Nodes | ||
| // So there is no need to move the Annotation since it will be updated later anyway (performance improvement) | ||
| if (locatable is AnnotationModel) |
There was a problem hiding this comment.
does this actually end up correctly setting the x and y of the annotationModel or does it draw it correctly, but leave the model data incorrect?
There was a problem hiding this comment.
This is how the notifications flow:
NestedNode.PositionUpdate => AnnotationNode.ModelDataUpdate => AnnotationViewModel.ViewModelDataUpdate
X and Y (and all other annotation model data) are set correctly in the annotation model then it draws (correctly).
| /// This class supports batch operations that should defer CollectionChaned notifications. | ||
| /// </summary> | ||
| /// <typeparam name="T"></typeparam> | ||
| public class SmartObservableCollection<T> : ObservableCollection<T> |
There was a problem hiding this comment.
because it is used to bind to WPF controls
Purpose
Purpose:
Improve performance when dragging/moving Annotations.
https://jira.autodesk.com/browse/DYN-4600
Changes in this PR:
Declarations
Check these if you believe they are true
*.resxfilesRelease Notes
(FILL ME IN) Brief description of the fix / enhancement. Mandatory section
Reviewers
(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)
(FILL ME IN, optional) Any additional notes to reviewers or testers.
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of