* To make it less expensive, a method has been added
to AnnotationViewManager to refresh not all annotations
but only the highlights.
* This is used as a scheduled redraw task inside SessionView
to not make it a CPU hog.
* The destroy mechanism for SessionView has been restructured
to accomodate multiple asynchronous destructors.
* 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
Also, decrease the maximum latency between a render request and when the
update is performed to be 0ms. The previous value of 200ms was quite
noticeable when indenting or unindenting paragraphs.
Adds an SVG overlay that takes no pointer-events,
and uses a polygon element inside to it draw
selections with stroke and fill of the user's
color.
Removes the 3 divs used previously.
* New operations: OpAddMember, OpRemoveMember,
OpUpdateMember.
* Member data is now handled in a memberDataManager
instance inside OdtDocument.
* Any operations must be executed only if a member
is present within this model.
* All polling code for member data has been removed;
colors, names, and images now instantly update
whenever a member data operation is executed.
* Added relevant entries to the OT Matrix.
In various parts of the code, the magical empty-string cursor id is used
to determine whether the object is a shadow cursor or not. Converting
this into a constant instead and removing the constructor arg prevents
some mistakes being made with this.
* Unsubscribe from requests to rerender when destroying
* Use an interval-based loop of 200ms to check if a redraw
has been requested, and rerender in that case.
SelectionViewManager that maintains SelectionView instances, and a
shadow cursor object that is an invisible caret-less cursor, fed to both
SessionController and SessionView, which follows the selection as it
changes.
Selections by each cursor are colored according to their memberid
annotation-end node if the length of the selection > 0.
* Adds a button to the editor to add an annotation at the given cursor position
or selection
* A bad hack in AnnotationViewManager: The dc:creator of
a created annotation is initially empty because the operation has no
way to access the user model even if it knows the memberid. The
SessionView has a new rule for editinfo:memberid attributes that sets
the CSS content: attribute to the user name. AnnotationViewManager,
for now, will read this CSS property and set the text of dc:creator to
that; at least till we have a better way to access the usermodel in
the future
* Rerenders annotations when an annotation is added for tracking (like upon creation)
* SessionView gets a way to concretely specify the CSS pseudo-class for a rule (:before, :after, etc)
* enableAnnotations only allows handles annotations if the allow value
changes
* Add translation strings for annotate
Removing the local cursor (e.g., calling SessionController.endEditing)
previously left behind an orphaned caret that would continue to receive
focus/blur commands and attempt to remain visible. This would cause an
error to be thrown after most operations.
This change turns CaretFactory into a manager that is responsible for
proper disposal of carets unpon the corresponding cursor's removal from
the document.
Various editors have inconsistent behaviour on this front.
* LibreOffice (Mac) - always blinks even with range select
* Firefox, Chrome, Word (Mac) - hides the caret on range
these days only results in AvatarStyleInfo missing after replay for those members
whose cursors are added during the replay and for which the userdata arrives
already before the replay is finished, so that setAvatarInfoStyle() is never
called for them (unless there is an update on the userdata, but that rarely
happens)
Also:
* merge paragraphEdited event of ops.OdtDocument into paragraphChanged event of ops.Session
* remove any event subscription/emitting from ops.OdtDocument