Andrei486 / uml-diagram-collab

0 stars 0 forks source link

Make text styling UI functional #102

Closed em66850 closed 5 months ago

em66850 commented 6 months ago

Resolves #101

em66850 commented 6 months ago

Code cleanup, docs, and tests in progress.

em66850 commented 6 months ago

Known issues:

Andrei486 commented 6 months ago

The commands work when sent between users, the correct styling is applied to the element. However, the formatting panel's fields do not update: this is because the formatting panel only updates when the active editable label is changed. There are two possible ways to fix this:

More notes on the model approach. When the currently edited label is changed, the field/button values should be recalculated, the same way that FormattingPanelController currently does. Additionally, the styling command should have access to the model (passed in via its factory) and should update the specific properties changed only if the target label is the one that the model is storing information for. The formatting panel should still ensure that all its fields are disabled when no label is selected, and should have change listeners for the other model properties as well (it should probably be one change listener that re-updates all the fields like it currently does). It may not have to recalculate the field values to set because the model should already that; alternatively the formatting panel could be put in charge of doing that recalculation and updating the model when the editable label changes, though I think this would only make sense if the model is separate from the EditableLabelTracker.

Andrei486 commented 5 months ago

The last commit is an attempt to resolve #119 .