0px height elements are not able to receive an active selection in most
browsers. Setting a minimum height ensures the event trap is still able
to be selected when in an empty paragraph.
Inline blocks will cause the browser to allow word-wrapping to occur
either side of the node, an effect that is VERY undesirable for a
caret.
Making the event trap absolute, but expanded to the full height of the
cursor shows the composition menu displays in the same place as if
the trap was an inline-block. The cursor and trap are switched to inline
blocks during composition so the contained characters take up space in
the document.
This change extends the use of the event trap to allow in-line character addition
using the OS's IME. The event trap will now be moved to within the local user's
cursor block, and will become visible when a composition start event is detected.
This has been tested on Chrome, FF & Safari on all platforms. In addition, this
enables support in FF on Android.
Known issues
- No IME support on Chrome under Linux. The compositionend event emitted by Chrome
contains no data, so the input character can't be detected.
Previous implementation was using the element type (span or div) to
determine if the element was a handle or caret. This is problematic if
additional elements are placed inside the cursor node (as necessary for
proper IME support)
Current behaviour:
Left click causes navigation in both edit and view mode
After the change:
Same as current behaviour in view mode.
In edit mode, left click will just move the cursor to desired position. In order to navigate, user need to hold control key and then click
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.
Problem with the dipslay:block.
If we don't set a height for text:line-break, then there is no gaps
between sentences. As block element with no height doesn't take any space.
On the other hand if we do set a height for text:line-break, then all the
line breaks takes an empty line which is not exactly what we like. The
very first one should just end the line.
The recent shadow cursor implementation hides the native browser selection
highlights. However, the shadow cursor itself only starts being drawn
after edit-mode is enabled, meaning for a readonly document the selection
is invisible (#119)
This is a simple workaround that allows the native selection to be drawn
in circumstances where the shadow cursor is not active. Long term, the
shadow cursor should be also used on non-editable documents as detailed
in solution ideas for #119.
*Added a ImageSelector class to draw and clear image selection
Known issue:
The selection box is moving up and down when using browser's zooming functionality. but it is working fine with the slider zoom
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
Implementation makes judicious use of the cursor's selection and
getClientRects to compute small adjustments necessary to make the
caret more closely match the browser caret positioning.
At the moment, each cursor must be re-fixed after any operation that
may affect the line height of the caret (e.g., removing a text char may
place cursor next to a larger text character)
This implementation has been tested with
- Forward & backward selections
- Wrapped text & white space
- Image deletion
to delete the annotation
* Add click-handling for such buttons in SessionController
* Add OdfCanvas.forgetAnnotations() to untrack annotations
* Add OpRemoveAnnotation that takes a position within the
annotation, and deletes that annotation. It also takes the
walkable length of the annotation node for OT purposes.
Any cursors inside are moved to the left of the annotation.
annotation in html containers, adds connector elements, and a text
highlight.
Trigger OdfCanvas's anntationManager instance whenever any text
modification operation occurs.
* Add a highlighting and therefore a connector regardless of the
presence of annotation-end.
* Some :before css to render an arrowhead of the connector
* A new RootFilter in OdtDocument
* A new core.PositionFilterChain to concatenate filters and chains
* Functions to convert steps between two filter spaces in SelectionMover
* A keyboardMovementsFilter = { base filter + RootFilter } chain in
SessionController, used to calculate steps to move triggered by keyboard
events. These steps are then mapped to base filter's space for op
initialization
via CSS
*Refactoring: Move common functions from TextStyleApplicator to DomUtils
and OdfUtils.
*Allow application of 'gui' style (with an annotation: namespace) in
TextStyleApplicator and Formatting.
*More CSS for annotations.
*Make OdfCanvas handle annotations.
Add an annotation:connector element to the highlight span for a dotted
line
OpRemoveText depends heavily on there being text present
for the node to be considered for removal. A simple way
to allow deletion of tabs is to add some basic text content
(e.g., a tab char) so the text node is then considered and
the containing tab can be cleaned up.
* Modify css to preserve whitespace in tab elements
* Added assert to OperationsTest to ensure correct tab data
* Updated all tests to specify the correct tab text content
presentation|date-time-decl, and use draw|page:nth-of-type instead of
nth-child to select the page to be displayed. Now the slideshow only
shows actual slides, not other objects
these dimensions from the page style.
A new API call has been added to know the type of document
(text/presentation/spreadsheet), and this is used to decide what sort of
CSS rule to generate for page layouts.
As a little temporary hack, for slideshows, the last page style where the
height is lesser than the width is used for layouting, because for the
vast majority of presentations this holds true. This will change once we
adequately implement support for master styles.
In webodf, the handle's image's border is set with the user's color
instead of the handle background. Also, the cursor span is changed to
2px width for better visibility.
In editor.css, custom CSS overrides are applied to make the handles look
very much like the avatar 'thumbnails' in the people sidebar.