You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is a high time we bring some improvements to how markers are converter and how they work in undo. These are needed for better user experience in collaboration features.
These are:
Add an additional event fired by DowncastDispatcher when a non-collapsed marker is converted. Until now, for non-collapsed markers, DowncastDispatcher fired one event for each node in the marker's range. This was very inconvenient if one wanted to handle the whole marker "together" / "at once". Now, before events for nodes are fired, there will be one event fired for the whole marker. The events can be recognized by checking data object. The "global" event does not have data.item property. If the "global" event is consumed, then the events for nodes will not be fired.
Better handling of markers during undo:
Whenever move, remove or merge action on model.Writer would affect a marker, a MarkerOperation is generated. It does not change the marker but acts as a "stamp". This "stamp operation" is used then in undo. It is in the undo step so it is transformed and thanks to this mechanism a marker can be correctly recreated during undo.
MarkerOperation transformations will use context now to make it possible to recreate them correctly during undo.
Creating a new marker operation each time marker is affected may have an impact on the undo efficiency and amount of data sent. However, at the moment, this is the least intrusive and the simplest way to deal with markers handling during undo.
The text was updated successfully, but these errors were encountered:
It is a high time we bring some improvements to how markers are converter and how they work in undo. These are needed for better user experience in collaboration features.
These are:
Add an additional event fired by
DowncastDispatcher
when a non-collapsed marker is converted. Until now, for non-collapsed markers,DowncastDispatcher
fired one event for each node in the marker's range. This was very inconvenient if one wanted to handle the whole marker "together" / "at once". Now, before events for nodes are fired, there will be one event fired for the whole marker. The events can be recognized by checkingdata
object. The "global" event does not havedata.item
property. If the "global" event is consumed, then the events for nodes will not be fired.Better handling of markers during undo:
Whenever
move
,remove
ormerge
action onmodel.Writer
would affect a marker, aMarkerOperation
is generated. It does not change the marker but acts as a "stamp". This "stamp operation" is used then in undo. It is in the undo step so it is transformed and thanks to this mechanism a marker can be correctly recreated during undo.MarkerOperation
transformations will use context now to make it possible to recreate them correctly during undo.Creating a new marker operation each time marker is affected may have an impact on the undo efficiency and amount of data sent. However, at the moment, this is the least intrusive and the simplest way to deal with markers handling during undo.
The text was updated successfully, but these errors were encountered: