list/legacytodolist/legacytodolistconverters
Constants
-
module:list/legacytodolist/legacytodolistconverters~dataViewModelCheckmarkInsertionA view-to-model converter for the checkbox element inside a view list item.
It changes the
listTypeof the modellistItemto atodovalue. When a view checkbox element is marked as checked, an additionaltodoListChecked="true"attribute is added to the model item.It is used by
DataController.
Functions
-
dataModelViewInsertion( model ) → GetCallback<DowncastInsertEvent<ModelElement>>internalmodule:list/legacytodolist/legacytodolistconverters~dataModelViewInsertionA model-to-view converter for the
listItemmodel element insertion.It is used by
DataController.Parameters
model : ModelModel instance.
Returns
GetCallback<DowncastInsertEvent<ModelElement>>Returns a conversion callback.
Related:
-
mapModelToViewPosition( view ) → GetCallback<MapperModelToViewPositionEvent>internalmodule:list/legacytodolist/legacytodolistconverters~mapModelToViewPositionA model-to-view position at zero offset mapper.
This helper ensures that position inside todo-list in the view is mapped after the checkbox.
It only handles the position at the beginning of a list item as other positions are properly mapped be the default mapper.
Parameters
view : EditingView
Returns
-
modelViewChangeChecked( onCheckedChange ) → GetCallback<DowncastAttributeEvent<ModelElement>>internalmodule:list/legacytodolist/legacytodolistconverters~modelViewChangeCheckedA model-to-view converter for the
todoListCheckedattribute change on thelistItemmodel element.It marks the checkbox UI element as checked.
It is used by
EditingController.Parameters
onCheckedChange : ( element: ModelElement ) => voidCallback fired after clicking the checkbox UI element.
Returns
GetCallback<DowncastAttributeEvent<ModelElement>>Returns a conversion callback.
Related:
-
modelViewChangeType( onCheckedChange, view ) → GetCallback<DowncastAttributeEvent<ModelElement>>internalmodule:list/legacytodolist/legacytodolistconverters~modelViewChangeTypeA model-to-view converter for the
listTypeattribute change on thelistItemmodel element.This change means that the
<li>element parent changes to<ul class="todo-list">and a checkbox UI element is added at the beginning of the list item element (or vice versa).This converter is preceded by
modelViewChangeTypeand followed bymodelViewMergeAfterChangeTypeto handle splitting and merging surrounding lists of the same type.It is used by
EditingController.Parameters
onCheckedChange : ( element: ModelElement ) => voidCallback fired after clicking the checkbox UI element.
view : EditingViewEditing view controller.
Returns
GetCallback<DowncastAttributeEvent<ModelElement>>Returns a conversion callback.
Related:
-
modelViewInsertion( model, onCheckboxChecked ) → GetCallback<DowncastInsertEvent<ModelElement>>internalmodule:list/legacytodolist/legacytodolistconverters~modelViewInsertionA model-to-view converter for the
listItemmodel element insertion.It converts the
listItemmodel element to an unordered list with a checkbox element at the beginning of each list item. It also merges the list with surrounding lists (if available).It is used by
EditingController.Parameters
model : ModelModel instance.
onCheckboxChecked : ( element: ModelElement ) => voidCallback function.
Returns
GetCallback<DowncastInsertEvent<ModelElement>>Returns a conversion callback.
Related: