Skip to content
This repository was archived by the owner on Apr 16, 2026. It is now read-only.

Commit db1b282

Browse files
committed
Make line widget handles objects with methods. Handle widget height better
Closes #1147 Widget handles now have .clear() and .changed() methods. The second informs CodeMirror that the widget changed, and causes it to recompute the line height for the widget's line. Fixes some sloppiness in the tracking of widget heights.
1 parent ee07146 commit db1b282

2 files changed

Lines changed: 70 additions & 25 deletions

File tree

doc/manual.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -978,12 +978,15 @@ <h2 id="api">Programming API</h2>
978978
CodeMirror-specific CSS classes, and those classes might in some
979979
cases affect it. This method returns an object that represents
980980
the widget placement. It'll have a <code>line</code> property
981-
pointing at the line handle that it is associated with, and it
982-
can be passed to <code>removeLineWidget</code> to remove the
983-
widget.</dd>
984-
985-
<dt id="removeLineWidget"><code>removeLineWidget(widget)</code></dt>
986-
<dd>Removes the given line widget.</dd>
981