This provides better encapsulation and clarifies the usage slightly.
Hopefully, it will decrease the ways to cause the selection & actual
cursor position can get out of sync.
As this was the only use of the Selection stack, the whole class is
now removed
specified in getPositionInTextNode. Also, if there is a preferred cursor
node, then return the empty text node as immediately to the left of that
cursor.
* Add the memberid argument to it's call in OpInsertText. Now if many
cursors are at the same position and one cursor inserts text, the others
don't move along.
The root node element of the flat ODF, <document>, is not a direct child of the
variable "sizer" in the odf.OdfCanvas code) which is used to implement the
zooming feature, by using the scale() transformation via the styles.
Problem is that this scaling does not also scale the actual space used by the
element. To fix this there is a method fixContainerSize() which is used to adapt
the size of the canvas element to the actual rendering size of the document
content. This code then sets the width and height properties to fixed values.
But all this results in another problem: the canvas element is not resized
automatically by the usual DOM behaviour if the content below the <document>
node or the CSS applied to it parts is changed.
The initial plan was to use DOMSubtreeModified & friends, to have the
odf.OdfCanvas care for updates itself. But as it seems outdated and has quite
some overhead on larger changes to the document, in the end it was decided to go
for now with the approach that was chosen for the style changes, to rely on the
document modifying ops to trigger the needed canvas updates themselves. Not
perfect, but seemed consistent at least.
Also:
* merge paragraphEdited event of ops.OdtDocument into paragraphChanged event of ops.Session
* remove any event subscription/emitting from ops.OdtDocument
Idea here is to create abstraction as much as possible for all ODF-related
objects, e.g. the cursor objects now belong to and know the ODF document model
they run around in.
Some avatar tests still need fixing/adaption, but from manually testing it
looks good, so commiting now to prevent too much differences.