Trevor Parscal
519d225d2f
Cleanup of white space, missing semi-colons, line breaks, etc.
...
Change-Id: Ifa96a9f70fa8d149a4c403521aaa88a3e0546ef0
2012-04-02 15:28:26 -07:00
Rob Moen
d8de26d7e9
On selection, update selection in the model. Fixes selection.clone() error.
...
Change-Id: Ibd5cf0398002e5fbb2c50549e4a7043ba8fd00a7
2012-04-02 14:19:53 -07:00
Rob Moen
c1300ba949
Fixed surfaceView undefined error
...
Change-Id: Iba3ae54b4e508afbfa132e0f0b2b0b237e685395
2012-04-02 13:49:45 -07:00
Trevor Parscal
19f3d5c107
Added ve.Surface, a wrapper around an editor instance
...
* This high level surface object is responsible for creating & managing editor instances
* Revised Sandbox demo to invoke in this way.
Change-Id: I4043779af9a2ab964deaf26079a992e82ebeef27
2012-03-29 15:55:33 -07:00
Catrope
7a726b0278
Add tree synchronization for replace
...
To handle replace operations that are not themselves consistent (these
are common, for instance when replacing an opening element in one place,
then replacing the closing element somewhere else), we process
subsequent replace operations inside the first one until things are
balanced again, then issue a single rebuild for the whole thing.
Change-Id: Ide4613f046fabfeeef383138c39e350b1b710033
2012-03-26 02:51:30 -07:00
Catrope
826437950c
adding clearState function for tools and using clearState if no selection exists
...
Originally committed in SVN as r114418 by Christian, missed the git
conversion
Change-Id: I56e91c170670519fa2b482a4b7f30cdcbc8ff163
2012-03-22 14:22:15 -07:00
Rob Moen
e5df79229d
make clear button tool work with annotate method in ce surface
2012-03-16 22:20:16 +00:00
Inez Korczynski
299c77db84
Make LinkInspector works (using annotate method in SurfaceView)
2012-03-16 22:16:15 +00:00
Inez Korczynski
b2f4b48a9a
Use on and off insteaf of bind and unbind.
2012-03-16 22:01:09 +00:00
Rob Moen
277e239796
CE surface has no hidden input, removed input focus
2012-03-16 22:00:42 +00:00
Inez Korczynski
6ef8ac182a
No more endless looping! And fix getSelectionRect to return document relative coordiantes instead of viewport relative.
2012-03-16 21:52:17 +00:00
Rob Moen
cde7a3bf7e
adapt LinkInspector to use surfaceObserver for selection
2012-03-16 20:18:26 +00:00
Rob Moen
93376d68eb
add surfaceObserver on select methods to ui toolbar and surfaceView for responding to select event. tools now updating to selected node annotations. revise getSelectionRect to return actual start & end pos. context icon properly showing on range selection
2012-03-15 22:06:40 +00:00
Roan Kattouw
05333b1f3d
Put the invert state / method (commit or rollback) in the TransactionProcessor object and no longer pass it as a parameter to each operation. This makes it easier for operations to execute other operations.
2012-03-14 21:02:36 +00:00
Roan Kattouw
bf5ea06db5
Factor out process() into nextOperation() and executeOperation()
2012-03-14 21:02:34 +00:00
Roan Kattouw
2c43a34f74
Rewrite the rebuild action to take two ranges rather than a node and some data.
2012-03-14 21:02:31 +00:00
Roan Kattouw
37a59016e8
Break out pushAction() into separate functions for each action. This will allow me to change the rebuild action to take totally different parameters.
2012-03-14 21:02:29 +00:00
Roan Kattouw
bd9a86dd55
Remove the offset adjustment feature from DocumentSynchronizer. It gets in the way when I try to use this class in TransactionProcessor.
2012-03-14 21:02:27 +00:00
Roan Kattouw
1e17285afb
Move computation of missing offset from pushAction() to synchronize(), and only compute offsets for actions that require them. This also fixes an issue where offsets computed by pushAction() would be adjusted incorrectly by pushAction().
2012-03-14 21:02:26 +00:00
Roan Kattouw
7dd2b8b725
Make DocumentSynchronizer clear the queue after it's done with it
2012-03-14 21:02:24 +00:00
Inez Korczynski
f87709d6bb
Use <h[1-6]> tags for rendering headings (instead of divs)
2012-03-14 00:51:04 +00:00
Rob Moen
d77c0b91dc
fix dropdown tool to use selection from ce surfaceView
2012-03-14 00:29:41 +00:00
Inez Korczynski
294d474c54
Replace CursorObserver and ContentObserver with SurfaceObserver
2012-03-14 00:04:24 +00:00
christian
d174809b54
replacing showCursorAt calls with correct showCursor method
2012-03-13 18:12:57 +00:00
christian
010c97acc8
removing min height attribute to fix IE bug
2012-03-12 23:31:08 +00:00
christian
ba437744b3
preventing native contenteditable resizing tools
2012-03-12 23:06:47 +00:00
Rob Moen
350a53fd93
rework context icon positioning for CE surface using new getSelectionRect method
2012-03-12 22:14:43 +00:00
Rob Moen
22a351e855
small fix: getSelectionRange was breaking the surface layer, changed to saved state member
2012-03-12 22:04:29 +00:00
Rob Moen
65170e13df
port over select event listener, and updateSelection methods for setting and removing context icon, add getSelectionRect method for context icon position
2012-03-12 21:50:22 +00:00
christian
56b9068d03
switch to getSelectionRange and fixing IME native menu
2012-03-12 20:39:08 +00:00
Alexandre Emsenhuber
99a31bacbc
svn:eol-style native
2012-03-11 18:38:27 +00:00
Roan Kattouw
29f416937e
Fix some usages of splice.apply in the data model to use
...
ve.batchedSplice(). Added FIXME comments for occurrences outside of DM
2012-03-10 00:31:28 +00:00
Inez Korczynski
9a8f7059fc
Make ContentObserver pass information about content when emiting change event.
2012-03-09 23:15:23 +00:00
Trevor Parscal
02592b3ec0
More cleanup
2012-03-09 22:55:49 +00:00
Trevor Parscal
60c9c484aa
More cleanup (jshint complaints)
2012-03-09 22:51:00 +00:00
Trevor Parscal
ce824d6299
Cleanup
2012-03-09 22:45:22 +00:00
Inez Korczynski
4bc7dbbe5e
Initial import of CursorObserver and ContentObserver (not being used yet).
2012-03-09 22:18:24 +00:00
Trevor Parscal
2f9fcde16e
Removed duplicate static methods and members that were copied to ve.dm - lets just leave them in ve.dm.DocumentNode for now.
2012-03-09 21:54:00 +00:00
Roan Kattouw
b13d0a849d
Add a check for the length of unwrapOuter, and add a test for each
...
exception
2012-03-09 01:44:31 +00:00
Roan Kattouw
bc600b34be
Make prepareWrap() use the data from the model rather than the unwrap
...
parameters. This fixes the case where rolling back a list unwrap would
restore the list items without their attributes
2012-03-09 01:14:41 +00:00
Roan Kattouw
04910777d9
Fix stupid typos so wrapEach actually works
2012-03-09 00:38:34 +00:00
Roan Kattouw
ab26581b2e
Fix cursor adjustment in replace()
2012-03-08 23:21:28 +00:00
Roan Kattouw
5054ed320e
Implement prepareWrap and add tests for it
2012-03-08 23:21:26 +00:00
Roan Kattouw
9b66749575
Add documentation for to-be-written prepareWrap function
2012-03-08 23:21:24 +00:00
Roan Kattouw
d978797fca
Add a very simple transaction builder for content replacements
2012-03-08 23:21:21 +00:00
Roan Kattouw
cac9971299
Implement the replace operation for the linear model
2012-03-08 23:21:20 +00:00
Roan Kattouw
46dbb30b7a
Factor the batched splice code out from ve.insertIntoArray() into a
...
separate function
2012-03-08 23:21:18 +00:00
Roan Kattouw
93deba7b5c
Add replace operation
2012-03-08 23:21:17 +00:00
Trevor Parscal
becb1daa39
Added more tests for ve.dm.DocumentSynchronizer and fixed some bugs along the way
2012-03-08 19:35:51 +00:00
Alexandre Emsenhuber
62e8312535
svn:eol-style native
2012-03-08 12:27:02 +00:00