Inez Korczynski
1186949675
Fix bug in deletion: callback for traverseUpstream should get parent of current node, not of the node from which traversal started.
2011-11-22 20:11:23 +00:00
Inez Korczynski
2d8440132e
Fix setInterval bug in IE (in IE setInterval doesn't take 3rd parameter)
2011-11-22 19:59:18 +00:00
Inez Korczynski
b60a82c50e
Make toolbar float when scrolling the page
2011-11-22 07:17:08 +00:00
Inez Korczynski
0fef27aae7
Fix bug with selecting words
2011-11-22 02:23:39 +00:00
Trevor Parscal
56d05ce855
Reverted an issue in r103873 - fall through was intentional
2011-11-22 01:25:15 +00:00
Trevor Parscal
5bb01d20ef
Backing out history integration for now
2011-11-22 00:26:50 +00:00
Trevor Parscal
ee12891dbe
Added support for meta key (mac command key) for undo/redo
2011-11-21 23:54:57 +00:00
Trevor Parscal
70147a166d
Fixed breaks in a switch being inside ifs, causing them not to properly terminate the switch
2011-11-21 23:53:37 +00:00
Trevor Parscal
631323b9bd
* Refactored es.HistoryModel to always be working from a single array rather than a buffer and an array
...
* Added support for associating a selection with a state
2011-11-21 23:51:37 +00:00
Inez Korczynski
68ea54fcf3
Bind ctrl+z to history undo and ctrl+y to history redo.
2011-11-21 23:25:43 +00:00
Inez Korczynski
392d911c3d
States is an array of array of transaction, so one more iteration is needed.
2011-11-21 23:10:31 +00:00
Trevor Parscal
e0f746d3d5
Installed HistoryModel into SurfaceView
2011-11-21 22:59:40 +00:00
Inez Korczynski
db7b4dff64
Auto scroll to cursor is showCursor method
2011-11-21 22:55:48 +00:00
Trevor Parscal
6f8d229416
Cleaned up some issues with scoping, line ending, variable redeclaration, etc.
2011-11-21 22:43:56 +00:00
Trevor Parscal
779a63f486
* Switched to using JSON for hashing, allowing us to use the native JSON.stringify where available, which is much faster
...
* Added a bunch of utility functions for working with character data and annotations
* Got toolbar button states to follow selection of more than one character
2011-11-21 22:32:22 +00:00
Trevor Parscal
9590783f50
Added emitting selection on mouse move
2011-11-21 22:07:03 +00:00
Inez Korczynski
f840fb7a1f
Created generic function 'handleDelete' that is used for content deletion initiated with backspace or delete keys.
2011-11-21 21:50:14 +00:00
Inez Korczynski
61cfdb58fb
Improve logic for moving cursor up and down - especially in case of initialBias - code has to be refactored.
2011-11-19 03:07:27 +00:00
Inez Korczynski
77ff26d61d
Improve logic for moving cursor up and down - especially in case of initialBias - code has to be refactored.
2011-11-18 23:21:33 +00:00
Inez Korczynski
ed299c01d9
Reset value of initialBias and initialLeft states after pressing backspace/delete/enter or typing text
2011-11-18 20:09:13 +00:00
Inez Korczynski
bd92a3aaf8
Improve logic for moving cursor up and down - especially in case of initialBias.
2011-11-18 19:57:53 +00:00
Inez Korczynski
bf1b9a881f
Improve logic for moving cursor up and down - especially in case of initialBias.
2011-11-18 19:48:43 +00:00
Roan Kattouw
35a99b4be0
Make es.TransactionProcessor.remove() handle deep merges correctly, and add test cases. The code is still a bit rough and ugly and needs a bit more work, but I'll clean that up later; at least it works now.
2011-11-18 10:17:35 +00:00
Inez Korczynski
2d4c253f5e
Place cursor in correct place after deleting selected content.
2011-11-18 08:10:56 +00:00
Inez Korczynski
535139919b
Support for "backspace" and "delete" when content is selected - also better support for typing when entire node is selected.
2011-11-18 07:52:28 +00:00
Inez Korczynski
85cf0c27e2
Implementation of static function es.DocumentViewNode.getSplitableNode
2011-11-18 06:49:00 +00:00
Inez Korczynski
9bfee0642c
Temporary handle listitems merging/spliting logic in SurfaceView until it will be fixed in transaction preparation (prepareRemoval)
2011-11-18 06:45:11 +00:00
Inez Korczynski
9df503e788
Proper handling for "delete" & "backspace" keys
2011-11-18 06:43:42 +00:00
Inez Korczynski
d02ed50211
Proper handling for "enter" key
2011-11-18 06:17:14 +00:00
Inez Korczynski
307ab3506b
Start from removing selected content if there is any when typing
2011-11-18 05:51:50 +00:00
Inez Korczynski
d0d8e35f34
Code cleanup in SurfaceView - no any major changes
2011-11-18 05:44:24 +00:00
Inez Korczynski
44d42babe6
Comment out line that is throwing "Object has no method" when trying to assign output of method to "index" variable, which is not used later anyway.
2011-11-18 05:35:08 +00:00
Inez Korczynski
383e4e324a
Added static function es.DocumentNode.traverseUpstream
2011-11-18 05:18:48 +00:00
Trevor Parscal
098c9118f2
Added first node preservation when rebuilding
2011-11-18 00:26:54 +00:00
Trevor Parscal
a9d29af962
Using overwrite instead of build and swap method for line data in es.ContentView objects - this way line data is valid between renders
2011-11-17 23:43:53 +00:00
Trevor Parscal
48e7f4c3c6
Initial checkin of new es.HistoryModel (needs tests)
2011-11-17 22:44:11 +00:00
Trevor Parscal
6fded56cec
Renamed es.Transaction to es.TransactionModel
2011-11-17 22:42:18 +00:00
Roan Kattouw
117c785d85
Improve the merging logic in prepareRemoval() to also allow merging nested nodes, e.g. by deleting </p></li><li><p>
2011-11-17 19:23:15 +00:00
Trevor Parscal
2497e96ccc
Added documentation to getScope and made it a little less confusing to read
2011-11-17 19:19:02 +00:00
Trevor Parscal
c3521b00fd
Fixed the last of the rendering to much bugs - now things are rendered when needed only
2011-11-17 19:05:06 +00:00
Trevor Parscal
a0d7c14238
Fixed passing global offset to emit event, preventing render from re-rendering because it thought the render-from point was well past it's length
2011-11-17 18:54:52 +00:00
Trevor Parscal
284082b5d3
Simplified documentation
2011-11-17 18:26:00 +00:00
Trevor Parscal
5784d5f6f5
Added some new documentation for the new merging rules
2011-11-17 18:23:53 +00:00
Trevor Parscal
824cea173a
Fix for r103479 - had sign backwards! :(
2011-11-17 18:16:02 +00:00
Trevor Parscal
b93a69c1bc
Addressing another issue in r103447 - minor adjustment to loop
2011-11-17 18:14:14 +00:00
Trevor Parscal
e30c2f8135
Addressed some issues identified in review of r103447 - this could be cleaner, but it's trying to be optimized so the UI doesn't flicker during a remove/insert (such as splitting a block)
2011-11-17 18:11:48 +00:00
Trevor Parscal
38d6673e09
Fix for issue identified in review of r103377 - this will make it so insertion at a structural offset will work even if the parent isn't the document
2011-11-17 18:05:14 +00:00
Roan Kattouw
f8fd9fd840
Add an extra offset parameter to selectNodes() and use it in the recursion, so the results of recursive calls don't need to have their globalRanges translated
2011-11-17 18:00:16 +00:00
Trevor Parscal
43de57840e
Commented out some console.log statements
2011-11-17 17:59:15 +00:00
Roan Kattouw
41ace08026
Replace prepareRemoval() with a fixed-up version of my rewrite (which was commented out previously)
2011-11-17 16:44:44 +00:00