Delta transformation: move delta normalization to delta classes #4102
Labels
package:engine
resolution:invalid
This issue is invalid (e.g. reports a non-existent bug or a by-design behavior).
type:improvement
This issue reports a possible enhancement of an existing feature.
(Follow-up to ckeditor/ckeditor5-engine#977)
In ckeditor/ckeditor5-engine#977 I introduced "deltas normalization". To keep things simple and speed up work on the PR, I put it in one big function
getNormalizedDeltas
that takesDeltaClass
(class object) andoperations
array and basing on this, the function generates proper deltas. Inside the function there is a bigswitch
that checks what is theDeltaClass
.This solution has one big weakness -- it is impossible to extend it from outside. Of course the other weakness being that it is natural that this code be placed in static methods of delta classes (especially since the function is just a big
switch
block).Hence, I propose to split this function and move the code to the deltas.
The text was updated successfully, but these errors were encountered: