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
Currently merging strategy is coupled with VDOM merger and cannot be customized. You cannot create specific strategy for your own view type. This is important for couple of reasons:
It could fix in elegant way, problem with text input position. We could create specific view type for input that supports storing text position before updating text and restore it after that. It
It would allow to create custom views to implement integrations with foreign libraries (like Codemirror or Leaflet).
Possible solution is add specific "class" - ViewMerger that would implement methods like
merge - move functions like mergeTag, mergeText from VDOM createMerger
createNode - remove node() method from View and decouple it from View
finishAttach - called after node creation
prepareDestroying - called before node destroy
Additional class ElementViewMerger would contain specific methods like
setProperty - here we would fix input field issue
ViewMergers would be declared in createMerger call. Couple of ViewMergers would be declared by default. It would be ElementViewMerger, TextViewMerger and InputViewMerger.
The text was updated successfully, but these errors were encountered:
mrroman
changed the title
Customize merger per view type
Customizable merger per view type
Sep 18, 2016
Currently merging strategy is coupled with VDOM merger and cannot be customized. You cannot create specific strategy for your own view type. This is important for couple of reasons:
Possible solution is add specific "class" - ViewMerger that would implement methods like
merge
- move functions like mergeTag, mergeText from VDOM createMergercreateNode
- remove node() method from View and decouple it from ViewfinishAttach
- called after node creationprepareDestroying
- called before node destroyAdditional class ElementViewMerger would contain specific methods like
setProperty
- here we would fix input field issueViewMergers would be declared in createMerger call. Couple of ViewMergers would be declared by default. It would be ElementViewMerger, TextViewMerger and InputViewMerger.
The text was updated successfully, but these errors were encountered: