Closed michael closed 9 years ago
just tried: but this only half-works. problem is that scrollbar is paramatrized with array of highlighted nodes:
$$(Scrollbar, {
id: "content-scrollbar",
contextId: writerCtrl.getState().contextId,
highlights: writerCtrl.getHighlightedNodes(),
ref: "scrollbar"
}),
however this only gets affected on a real doc state change. i could only pass the function writerCtrl.getHighlightedNodes instead of its results, but then the scrollbar is no longer a writer-independent thing.
Mhh.. i think it's ok here to provide a function. However again the problematic of two different invalidation scenarios is striking us:
state change propagations vs. local document change causing a rerender.
but not when doc updates.. e.g. when you split or join an entity reference.. it doesn't get reflected at scrollbar.
is it legitimate to bind to document:changed events in content_panel?