10 Commits
Author SHA1 Message Date
Satvik Kumar 865541a3ed Use core.StepsDirection enum for rounding direction
The rounding direction constants in OdtStepsTranslator overlap with the
existing enum in core.StepsDirection. It makes sense to use that enum here
to specify rounding behaviour in converting DOM points to steps so the
constants have been removed and the enum has been substituted for all
usages.
2014-08-07 23:53:05 +10:00
Philip Peitsch adc5a08759 Re-implement navigate-to-line-boundary cursor movement 2014-07-23 02:17:19 +10:00
Philip Peitsch 41c7b36302 Slight performance improvement for StepIterator.roundToClosestStep
Fetching the offset for a position can be prohibitively slow in some
cases. Avoid storing this value until absolutely necessary.
2014-06-16 22:18:23 +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 b31501219c Extract re-usable step direction concept 2014-05-28 21:57:16 +10:00
Philip Peitsch 942450f427 Extract common concept for retrieving text content associated with a step 2014-05-16 21:40:13 +10: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
Friedrich W. H. Kossebau d2671e2a00 @returns -> @return 2014-01-31 15:33:43 +01:00
Philip Peitsch b1189d1762 Add tests for the StepIterator class 2014-01-22 23:29:02 +11:00
Philip Peitsch 012f7d98b4 Implemented faster & more robust cursor position fixing logic
Existing behaviour was slow if the cursor has a large distance between
the
anchor and focus nodes. It also tended to lose the first letter when
right
near the start of a paragraph or root boundary.

New logic avoids the need for expensive positional lookups, instead
exploiting the fact that the actual step value of the cursor is expected
to be unmoved. This allows the start and end points of the range to be
simply moved to their nearest valid step.

* Re-ordered ambiguous elements in test
"Remove_DeleteLastCharacterInSpan"

Fixes issue #261
2014-01-15 11:29:49 +11:00