Nathan Sobo
cfd9baa0d6
Use Editor::getVisibleRowRange instead of the rendered row range
...
The rendered row range is larger than the visible row range to force the
DOM to break up repaints. This is a more accurate method to us.
2014-06-05 11:54:28 +09:00
probablycorey
1d80c35708
Add active property
2014-06-04 17:33:49 -07:00
probablycorey
ad88ace448
Add getFirstVisibleScreenRow and getFirstVisibleScreenRow
2014-06-04 17:18:00 -07:00
probablycorey
a6d870bf4c
Add underlayer an overlayer classes to the correct elements
2014-06-04 16:32:50 -07:00
Nathan Sobo
fa66689c07
Add .editor class to react wrapper for package activation events
2014-06-04 21:07:13 +09:00
Nathan Sobo
905b28975e
Add split methods
2014-06-04 21:06:41 +09:00
Nathan Sobo
7e5f667b31
Don't assume ::component is defined
2014-06-04 21:06:27 +09:00
Nathan Sobo
eeb44407e3
Add ReactEditorView::getModel
2014-06-04 19:15:56 +09:00
Corey Johnson
087b52c9b4
Remove unnecessary append method.
2014-06-03 17:13:23 -07:00
Corey Johnson
18f7297968
Use actual property for overlayer
2014-06-03 17:12:56 -07:00
Corey Johnson
3cd34e0b4d
Add gutter.getLineNumberElement shim
2014-06-03 15:25:26 -07:00
Corey Johnson
25e3e46166
Make overlayer a property
2014-06-03 14:57:46 -07:00
Corey Johnson
2c84d69ff2
Add overlayer shim
2014-06-03 14:40:30 -07:00
Corey Johnson
3fb28803b5
Add append shim
2014-06-03 14:40:17 -07:00
Corey Johnson
dac792a243
Remove .editor class from ReactEditorView
...
ReactEditorView and EditorComponent were using the editor class. This
caused context menus that used `.editor` as the selector to display
twice.
2014-06-03 11:36:55 -07:00
probablycorey
2df2254227
Remove trailing semi-colon
...
I drank too much javascript today…
2014-05-30 15:10:44 -07:00
probablycorey
f4d256eef2
Use buffer row data attribute to find gutter lines
2014-05-30 15:05:15 -07:00
Corey Johnson
4840987082
Add overlayer class to ReactEditorView
...
Closed #2442
2014-05-29 15:16:48 -07:00
Nathan Sobo
6448258f4e
Add shims to support find-and-replace marker views
2014-05-27 12:11:01 -06:00
Nathan Sobo
875cfefd36
Merge branch 'master' into ns-ks-react-dont-measure-when-hidden
...
Conflicts:
spec/editor-component-spec.coffee
src/editor-component.coffee
src/editor-scroll-view-component.coffee
src/lines-component.coffee
2014-05-22 10:48:21 -06:00
Kevin Sawicki & Nathan Sobo
9e3ce09658
Rename lineHeight to lineHeightInPixels to distinguish from CSS value
...
CSS has a line-height property with values like '1.3', but we also have
a measured pixel value for line height. It's important to keep these
separate conceptually.
2014-05-22 10:17:12 -06:00
Kevin Sawicki & Nathan Sobo
ee9d4ab70e
Don't measure lineHeight/defaultCharWidth when editor is hidden
2014-05-21 17:15:47 -06:00
Nathan Sobo
65b1e13b83
Use Atom-specific fork of React allowing selection restoration opt out
...
This fork of React allows data-react-skip-selection-restoration to be
defined on input elements, skipping costly selection restoration that
occurs when the input element is focused during reconciliation.
2014-05-20 23:05:13 -06:00
Nathan Sobo
0334177696
Make lineOverdrawMargin a property
2014-05-16 15:31:15 -06:00
Nathan Sobo
c5fa2bf12d
Attach views to .lines instead of defunct .scroll-view-content
2014-05-16 15:31:15 -06:00
Nathan Sobo
bc8a1756f3
Use the .selections layer as the underlayer
2014-05-16 15:31:15 -06:00
Nathan Sobo
f53d489abb
Add DisplayBuffer::scrollToScreen/BufferPosition
...
Also add delegators in Editor and ReactEditorView
2014-04-22 17:10:23 -06:00
Nathan Sobo
628c2f82bd
Add scrollTop/scrollLeft shims to ReactEditorView
2014-04-22 17:10:23 -06:00
Nathan Sobo
df8a6437a5
Set appended view to 'position: absolute' in ::appendToLinesView
2014-04-22 17:10:22 -06:00
Nathan Sobo
43e6fb73f1
Focus react editor on attachment if it had focus previously
2014-04-22 17:10:22 -06:00
Nathan Sobo
e9f2a536ed
Add more shims to ReactEditorView
2014-04-22 17:10:21 -06:00
Nathan Sobo
e5379515b9
Transfer focus to ReactComponent when wrapper view is focused
2014-04-22 17:09:45 -06:00
Nathan Sobo
798739f837
Use beforeRemove instead of non-existent beforeDetach
2014-04-22 17:09:44 -06:00
Nathan Sobo
6b4ce5f205
Add shims to get git-diff-view working
2014-04-22 17:09:40 -06:00
Nathan Sobo
9a3f8022ad
Add shims to get bracket matcher working
2014-04-22 17:09:40 -06:00
Nathan Sobo
a2a625a7bb
Add ReactEditorView::getPane for backward-compatibility
2014-04-22 17:09:40 -06:00
Nathan Sobo
495b1571ca
Add 'editor' class to ReactEditorView wrapper for backward compatibility
2014-04-22 17:09:40 -06:00
Nathan Sobo
8772e96935
Temporarily remove '.editor' class from react editor wrapper
...
This will prevent warnings from packages during testing.
2014-04-22 17:09:36 -06:00
Nathan Sobo
e24196c0ef
Require React directly rather than via reactionary
...
Reactionary is just a tiny helper library that can rely on the react
installed by the requiring application instead.
2014-04-22 17:09:36 -06:00
Nathan Sobo
565b611c18
Do a better job imitating the old SpacePen-based editor
2014-04-22 17:09:04 -06:00
Nathan Sobo
53cc5c9856
Base cursor x position on char widths stored in DisplayBuffer
...
Whenever new lines are added to the screen, we measure and store any
unseen scope/character combinations in the DisplayBuffer.
2014-04-22 17:09:03 -06:00
Nathan Sobo
a134a60ce8
Render the entire editor with React. Handle vertical scrolling.
...
The space-pen view is now a simple wrapper around the entire React
component to integrate it cleanly into our existing system. React
components can't adopt existing DOM nodes, otherwise I would just have
the react component take over the entire view instead of wrapping.
2014-04-22 17:09:02 -06:00
Nathan Sobo
9c49a2d970
Use reactionary helper for creating virtual DOM elements
2014-04-22 17:09:01 -06:00
Nathan Sobo
8ad13d3045
Add a real spec for visible line rendering in the react editor view
2014-04-22 17:09:01 -06:00
Nathan Sobo
cc8ba2d679
Update the rendered lines when the screen lines change
2014-04-22 17:09:01 -06:00
Nathan Sobo
da36d5f40f
Start experimenting with an EditorView that renders content with React
2014-04-22 17:09:01 -06:00