Repository navigation
Add x and Y to NodeViewModel - #7945
Conversation
| /// Returns or set the X position of the Node. | ||
| /// </summary> | ||
| public double X | ||
| { |
There was a problem hiding this comment.
I think adding here will serialize the values correctly.
|
@ramramps Isn't there other code we need to change for accessing |
|
@QilongTang Sorry, I did not get it. ModelBase has X and Y, and NodeModel derives X and Y from it. Those are not seriailzed today. NodeViewModel has reference to NodeModel, so accessing X and Y must be straight forward. What other code change you are referring to? |
|
@ramramps @QilongTang - There will be more code to deserialize (which I think is what @QilongTang is asking about) but that would be part of the open task. |
|
oh - @ramramps on second thought I think what @QilongTang means is that you should mark these two properties obsolete on node model, and start using the nodeViewModel properties throughout the code base.... It's not required but a step in the right direction towards obsoleting them. |
|
@ramramps Sorry for I was just looking at other changes needed like
|
|
I think at the minimum mark these obsolete with the message we used before - and if possible use nodeViewModel instead of NodeModel to access x and y where possible (view code) |
|
Yes. I am adding the obsolete property on NodeModel. I am not changing the tests to use Nodeviewmodel x and y. Because x and y are still on NodeModel. Once we remove those obsolete properties, we can update the tests. Just want to keep the changes minimal. |
|
@ramramps fair enough. |
| /// <summary> | ||
| /// The Y coordinate of the node in canvas space. | ||
| /// </summary> | ||
| [Obsolete("This property will be removed from the model, please use the X property on the ViewModel in DynamoCoreWpf assembly.")] |
|
can you create a task for the refactor ? And then we can merge this. |
|
Task for refactoring : https://jira.autodesk.com/browse/QNTM-854 |
| RaisePropertyChanged("FontSize"); | ||
| RaisePropertyChanged("AnnotationText"); | ||
| RaisePropertyChanged("SelectedModels"); | ||
| RaisePropertyChanged("Nodes"); |
There was a problem hiding this comment.
Fixing AnnotationModel SelectedModels bug here. Just one line change.
Purpose
This PR adds X and Y to NodeViewModel.
https://jira.autodesk.com/browse/QNTM-842
Declarations
Check these if you believe they are true
*.resxfilesReviewers
@mjkkirschner