Pasting plain text with line breaks allows intelligent
merging into lists as well as multiple paragraphs.
Currently does not do the right thing on undo/redo,
as the undo manager does not respect operation groups
(yet).
The new step translator is also stricter about the requested number
of steps and will assert if more steps are requested than are available
in the document. This revealed a test that was asking for an invalid
step.
Previously, various consumers needed to be careful about only
asking for nodes inside the root node. Failure to do so resulted
in unpredictable behaviour.
To simplify the interface and improve the system robustness, this
rounding is now taken care of behind the StepsTranslator interface.
Drawing the cursor on every mouse move event badly impacts the responsiveness
of the application, because the move events buffer in the browser until
every single event is processed. By setting these on a background timer,
the cursor is updated asap, but is able to aggregate multiple move events
received in this time period.
Resynchronising the shadow cursor back to the window during a drag or
mouse-move operation is ignored in Chrome & FF, but causes exceptions
and strange selection behaviour in IE. There is no benefit to doing
this, as the selection is resynchronized on mouse-up regardless.
Internet explorer will occasionally discard the event before the timeout
callback is triggered, resulting in "Member not found" exceptions being
thrown.
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.
At this point, this is not intended to be open for extension as it is too
easy to break OT logic by incorrectly manipulating the operation groups.
Instead, convert this to use a specific-built extension point under tight
control of WebODF.
esc, tab, delete, backspace, undo/redo and copy/cut.
Note: MS Word behave differently from LO/AOO when image is selected.
When press letters,numbers&symbols, MS Word inserts the text just before the
image; where LO/AOO ignores all of them.
Also you can extend selectiion using keyboard shortcuts (e.g
shift+left) in MS Word, but you cannot do so in LO/AOO.
TODO:
Esc - deselect image
Tab - move to next frame in the document
*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
hold the 'selected range' fed to it, like with any other OdtCursor. It
provides a minimal OdtCursor-like interface, with only the methods
absolutely required to make it work. It does not modify the DOM in any
way.
* Make the shadowCursor object an instance of ShadowCursor, not
OdtCursor. This is ideal because ShadowCursor does not modify anything
in the DOM, and therefore is safer and faster to use for tracking
browser selections. This makes backwards-selections work finally,
because now there are no anchor nodes to interfere with the selection
whilst dragging.
* With the introduction of the ShadowCursor, we no longer have the
selection range's endpoints coinciding the with beginning and end of the
respective startContainer and endContainer. Therefore, modify
getExtremeRanges to reflect this. If an endpoint of the selection range
does not lie within a TextNode, we latch on to the nearest text node
within.
* In the SessionController, call maintainShadowSelection() if the
selection might leak outside the allowed local root, so that the
window selection object remains root-confined.
* Clone ranges if they may be later modified.
Properly detach ranges once they are used in SelectionView, less
memory leaks.
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
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.
Moving the cursor to the start of the removed annotation allows the
scrollIntoView behaviour to work more smoothly. Previously, removing an on-
screen annotation would likely result in the view being reset to the
cursor which was potentially offscreen at the time.
Fixes issue #33
The recent extraction of text manipulation functions slightly changed
the backspace key behaviour. The new interface was only returning true
if an operation was generated as a result of the call (aligning with
all other public functions on the class). This means however that back-
spacing when there is no available positions (e.g., at the beginning of
a document) was causing the browser to navigate back a page.
Element.focus() has additional logic that attempts to bring the top of
the element into view. This causes the a document that has been vertically
scrolled to reset back to the top of the document each time an Editor
button is clicked.
This redesign abstracts the event management away, and uses an invisible
div as the primary event trap. Because the div is always visible and
centred, the browser does not perform any scrolling. Non-bubbling events
are automatically forwarded from the event trap to subscribers.
Fixes Issue #44
Taking a sequence of ops also enables to give the guarantee that all
contained operations will be executed directly after each other,
in the given order. So creator of the ops can calculate the spec of each op
by relying on the known effect of the other ops.
- moved getAllStyleNames from Formatting to ObjectNameGenerator
- renamed StyleNameGeneratorTest to ObjectNameGeneratorTest and added a couple of more unit tests
Previously, the selection was being reset back to the word-boundary
of the word that contained the cursor at the time of the double-click.
Now, the browser selection is always updated, with additional logic to
expand the selection to the nearest boundary based on the double or
triple-click status of the event.
According to the specs, the click count is 0 if the user moves the
mouse between mousedown and mouse up. The definition of "moved" seems
a little loose, meaning there are still some unfixed side-effects (e.g.,
double-click & drag will reset back to word selection).
Pressing enter should clear the existing selection before adding a new
line to the document. This was missed when the functionality was added
to the insert text behaviour.