* remove @license tag (to prevent Closure compiler keeping the comment)
* use copyright@kogmbh.com email address everywhere
* remove "additional permission", to be added only to released webodf.js
* separate license header by empty line from following content
The type Runtime.ByteArray is removed. Uint8Array is used instead.
The more rigorous type checking is enabled by the flag --jscomp_error reportUnknownTypes.
To compile with this flag, build the target typecheck-target.
The selection direction was being lost when the window's current selection
was resynchronised to the cursor selection. For firefox and some versions
of Chrome, this would cause selection extension behaviours (shift+click)
to work incorrectly when attempting to extend the selection to the left
of the caret.
Works similarly to the existing cursor. A node is
placed in for the start and end positions of a cursor.
The window selection is updated based on cursor moved events.
The selection sync logic really belongs in SessionView. However,
as only a single selection is supported in the current
implementation, this has been temporarily put into SessionController.
A new function OdtDocument.getCursorSelection has been added
to make it trivial to support range-selection operations.
* Move responsibility for setting the memberId into Cursor to
allow proper hiding of anchor node
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
then we need to make sure not to delete cursorTextNode during
removeCursor! Otherwise the entire text content to the left of the
cursor will be deleted. Instead, clone the cursorTextNode and insert it
before the cursor position to preserve the DOM structure.
as a container + offset pair. Use this position for
iterator.setPosition() every time SelectionMover uses it for some
distance calculation. This fixes the problem where after a removeText
operation a textNode would be removed from the DOM and therefore
container.parentNode would be null, thus breaking movement.
A next patch will add more tests, but cursory testing already shows better behavior. The fix consists of more explicit communication with handlers about whether and how much the affected text node changes.
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.