Commit Graph
11 Commits
Author SHA1 Message Date
Friedrich W. H. Kossebau d2671e2a00 @returns -> @return 2014-01-31 15:33:43 +01:00
Jos van den Oever 163562a84d Generate list of JavaScript files in CMakeLists.txt.
Some types needed to be fixed due to the new file order.
2013-11-29 18:33:28 +01:00
Jos van den Oever 3c96e17009 Make sure the cursor always has a Range. 2013-11-26 16:56:01 +01:00
Philip Peitsch 6c7ef6a423 Add virtual selection overlays to the same parent as the annotations view
Virtual selection overlays were being added to the office:document
element. This is inconsistent with most other non-document UI overlays.
2013-11-19 23:35:49 +11:00
Philip Peitsch c8180264f2 Hide selection overlays for a region selection
A region selection is made when the user clicks directly on an image or
another object that will have a custom frame drawn around the target. In
this case, the selection overlay should not be drawn on top.
2013-11-06 23:03:53 +11:00
Friedrich W. H. Kossebau c2a795e668 Update link to repo: now https://github.com/kogmbh/WebODF/ 2013-10-23 18:20:30 +02:00
Friedrich W. H. Kossebau 508570dab8 Add copy of the AGPL3 to sources (+ add to created zip files) 2013-10-21 17:55:16 +02:00
Philip Peitsch 1ff4d6f9ec Upgrade from magical empty-string to const for shadow cursor memberId
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.
2013-10-16 21:43:00 +11:00
Aditya Bhatt 2a80174e69 Add documentation for the ShadowCursor class 2013-10-15 11:47:42 +02:00
Aditya Bhatt 05d8d6ce29 * Make hand-drawn selections have proper direction.
* All cursor classes gain hasForwardSelection() methods.
* maintainCursorSelection now preserves selection direction.
2013-10-15 11:47:42 +02:00
Aditya Bhatt aae55aca50 * Add a new ShadowCursor class. This class is meant, for now, to only
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.
2013-10-15 11:44:24 +02:00