22 Commits
Author SHA1 Message Date
Philip Peitsch bb56bc684c Convert odf.OdfUtils into a static singleton 2014-09-12 10:33:27 +10:00
Philip Peitsch 3172ad8dec Convert core.DomUtils into a static singleton 2014-09-12 10:17:09 +10:00
Philip Peitsch d18d2b5b8a Migrate SelectionMover.createPositionIterator to OdtDocument
Remove the SelectionMover file entirely as it no longer contains any
functionality.
2014-08-05 10:12:17 +10:00
Friedrich W. H. Kossebau 1e2a4a8323 Normalize license headers of the webodf.js source files
* 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
2014-06-02 12:19:05 +02:00
Philip Peitsch c0332ed1f9 Make caret and avatar overlays rather than inline content
Having the caret and avatar display inside the cursor node causes text
wrapping and other element shifts to occur in some browsers (mainly FF)
due to there being layout impacts from the almost-but-not-quite 0-width
cursor element.

Moving to non-inline overlays for these bits of chrome allows the cursor
to be hidden completely.

TODO
This commit introduces a regression when composing text using an IME
as the overlay doesn't advance properly during composition.

Fixes #86
2014-05-17 00:43:42 +10:00
Friedrich W. H. Kossebau fd020eee3f Use Error objects in callback passed to "destroy" methods
The currently plain undefined objects are not useful at all, because
the properties are undefined.
2014-04-11 13:53:10 +02:00
Aditya Bhatt d60958e816 Hide native selections only when virtual
selections are used.
2014-04-01 17:32:11 +02:00
Aditya Bhatt 49cee0d2de Use a new ops.Canvas.getSizer instead of peeking
at the ancestry of the document root in SvgSelectionView.
2014-04-01 17:32:11 +02:00
Philip Peitsch a4e08ba851 Schedule UI updates using requestAnimationFrame rather than setTimeout
Using requestAnimationFrame ensures the callback is executed prior to
the next redraw, eliminating undesirable & highly visible flickers for
UI updates.

Fixes issue #491.
2014-03-28 00:12:34 +11:00
Friedrich W. H. Kossebau 74ae34fef7 turn core.Async from class to namespace 2014-03-13 22:22:10 +01:00
Friedrich W. H. Kossebau 6232bd0917 prefix "draggable" element classname with "webodf-" 2014-03-10 15:43:48 +01:00
Friedrich W. H. Kossebau 83e50d37ed prefix "selectionOverlay" element classname with "webodf-" 2014-03-10 15:43:48 +01:00
Aditya Bhatt b811f715ee Add two handles to a selection's endpoints.
These are meant to be draggable.
2014-03-07 18:45:49 +01:00
Philip Peitsch 29dd19fdf6 Restore proper shadow cursor operation on FF
Firefox throws an exception if the SVG shape is rendered while the
polygon node is disconnected from the document (e.g., after an undo).
2014-02-27 23:01:29 +11:00
Jos van den Oever b3c77bf307 Move signals CursorAdded, CursorRemoved and CursorMoved to ops.Document.
This makes SvgSelectionView independent from ops.OdtDocument.
2014-02-24 15:13:13 +01:00
Jos van den Oever ff3c396aa6 Add core.Destroyable interface.
Every class that has a destroy() method now implements this interface.
2014-02-11 12:42:41 +01:00
Jos van den Oever e632ed2ae6 Make a large number of controllers 100% typed. 2014-02-08 13:37:50 +01:00
Jos van den Oever ed7270442f Remove loadClass calls from class files. The load system reads the dependencies from the manifest.json files now. 2014-02-07 15:38:09 +01:00
Jos van den Oever a9e64e645f Remove circular dependency between OdtDocument and OdtCursor.
OdtCursor does not depend on OdtDocument any more. In fact, it is not specific
to ODF any more so at some point it could be renamed.
2014-02-05 14:24:25 +01:00
Friedrich W. H. Kossebau d2671e2a00 @returns -> @return 2014-01-31 15:33:43 +01:00
Philip Peitsch b501f033f0 Only re-render the selection overlay once per batch of requests
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.
2014-01-31 10:28:14 +11:00
Philip Peitsch 3f2b2f0fb9 Support different selection view renderers
In certain cases it is useful to be able to swap out the technique used
to render cursor selections on the document. For example, SVG polygon
based rendering interacts badly with mouse events on the WebKit build
shipped on MacOS X 10.7.5.
2013-12-19 01:55:51 +11:00