As per design discussed in issue #816. Extracting this into a separate
view makes it optional for consumers to use (or potentially further
customize).
Fixes#816.
Moving these checks into a node filter ensures it is only required
once per node, rather than once per node-position.
This results in a 60% improvement in position iteration speed.
A common use-case for UI components is to only update the UI state just
before the next frame is rendered, irrespective of how many times a
signal is fired within a given batch of operations.
The event subscriptions object allows these to be easily created and
tracked, and also makes it easier to ensure all subscriptions are cleaned
up at the end.
Simplifies the caret class, and allows more exotic view configurations
to be inserted without breaking core code.
As a bonus, the new Viewport class is able to scroll arbitrary
rectangles into view.
In order to improve the OT-ability of text and paragraph removal
with other operations, the merge behaviour has been extracted.
The logic for building up the necessary remove operations has
been encapsulated in TextController for now as all uses pass
through this point still.
Operation batches that modify a large number of paragraphs (or repeatedly
modify the same paragraph) can cause numerous unnecessary style change
events to be triggered. Rather than reporting these instantly, track them
as they occur and emit the style change summary on batch end.
Related to #610.
On Windows the paths have backslashes causing any check against the array
of excluded files to fail. To solve this I used the path module to
normalize the file paths in the array of excluded paths for the license
string check.
It lazily computes required information and caches it
for further use -- an initial method inside it is
isLocalCursorWithinOwnAnnotation, which contains the logic
moved from DirectFormattingController. It would have been
expensive to perform this check separately everytime the
cursor moves in each controller.
This introduces SessionConstraints into SessionController
and AnnotationController. The latter comes with a new
permission, namely "edit.annotations.onlyDeleteOwn".
Code is added into AnnotationController to check
for the author name of the annotation node to be deleted,
and do nothing if it matches the name of the current
user.
* remove @license tag, for consistency with library source files
* use copyright@kogmbh.com email address everywhere
* remove "additional permission", to be added only to released stuff
* separate license header by empty line from following content