If you currently set sourceMarker and later try to remove it by setting it to null, marker-start SVG attribute will not be removed from the DOM. This is a mechanism to ensure that the actual presentation attributes can be removed if necessary.
This PR also defines TypeScript for defining custom special attributes and fixes various examples where special attributes were used.
Documentation
The unset callback for presentation attributes is called when an attribute is set to null.
If there is no unset callback defined, an attribute with the same name as attribute definition is removed.
Otherwise, it can be a string (an attribute to be removed from the DOM element), an array of strings, or a function that returns the aforementioned string or array.
Description
If you currently set
sourceMarker
and later try to remove it by setting it tonull
,marker-start
SVG attribute will not be removed from the DOM. This is a mechanism to ensure that the actual presentation attributes can be removed if necessary.This PR also defines TypeScript for defining custom special attributes and fixes various examples where special attributes were used.
Documentation
The
unset
callback for presentation attributes is called when an attribute is set tonull
.unset
callback defined, an attribute with the same name as attribute definition is removed.(node, attrs, cellView)
.