Commit Graph

8569 Commits

Author SHA1 Message Date
Corey Johnson
7379627fcb Add several scroll shims to ReactEditorView 2014-06-09 15:37:02 -07:00
Corey Johnson
a2c4caf7ad Move scroll methods below afterAttach method 2014-06-09 15:14:48 -07:00
Corey Johnson
e8b6fb919e Add shim for ReactEditorView::redraw 2014-06-09 15:06:49 -07:00
Corey Johnson
601c877136 Add pageDown/pageUp to ReactEditorView 2014-06-09 14:46:47 -07:00
Corey Johnson
31d7110bba Remove getPageRows from API 2014-06-09 14:42:47 -07:00
Corey Johnson
84de8c1bfd Move benchmark code to the end of the editor component 2014-06-09 14:01:45 -07:00
Corey Johnson
362f696e3e Add setFontFamily and setFontSize to ReactEditorView 2014-06-09 13:51:00 -07:00
Corey Johnson
677d3abe0e Add ::getFontFamily 2014-06-09 13:51:00 -07:00
Corey Johnson
c78f9137cc Make method style consistent with the rest of the file 2014-06-09 13:51:00 -07:00
Nathan Sobo
e9f116a14e Request update when cursors move outside of a batch update 2014-06-09 13:32:42 -06:00
Nathan Sobo
b2253ab7ce Add ReactEditorView::insertText shim 2014-06-09 13:32:42 -06:00
Nathan Sobo
fc5dc46e73 Make dummy line number have a buffer row of -1
This prevents accidentally returning the dummy line number when asking
for line numbers for buffer row 0 using shim code.
2014-06-09 13:32:42 -06:00
Nathan Sobo
43b5a9cfd0 Don't set focused: true on new pane when splitting
This causes the active item to change in the model before the associated
view can be added, which causes problems with the ReactEditorView having
methods called on it before its afterAttach hook creates the component.

We call Pane::activate subsequently unless activation is suppressed,
which will focus the pane anyway, so this was redundant.
2014-06-09 16:48:51 +09:00
Nathan Sobo
4387e16496 Emit selection:changed events if editor is alive after update 2014-06-09 16:13:09 +09:00
Nathan Sobo
6f3ebe8d0c Add ReactEditorView::hiddenInput shim 2014-06-09 15:16:38 +09:00
Nathan Sobo
b1563fdfc0 Destroy item's of last pane even if the pane itself is not destroyed
We always want to preserve at least one pane, so we don't call destroy
on the pane if it is the last pane. However, we still want to destroy
its items. This was previously relying on the view to destroy the
underlying item, which isn't as reliable as doing it in the model.
2014-06-09 15:04:51 +09:00
Nathan Sobo
2f3d74c047 Merge branch 'master' into cj-add-react-editor-shims
Conflicts:
	src/react-editor-view.coffee
2014-06-06 23:59:54 +09:00
Nathan Sobo
cae5cdc81c Put the .editor class on the wrapper, not the component
Things depend on the react editor wrapper having the .editor class,
but inside the editor, we can control the style. I changed the
component's div to be .editor-contents for now. We can eliminate this
extra style when we eliminate the wrapper.
2014-06-06 23:52:35 +09:00
Nathan Sobo
2234ff78c7 Include line-number class for backward compatibility 2014-06-06 16:54:28 +09:00
Nathan Sobo
fca6a7758b Don't run afterAttach hooks twice on ReactEditorView 2014-06-06 16:46:14 +09:00
Nathan Sobo
7dae04b8d4 Add ReactEditorView::getText 2014-06-06 16:46:14 +09:00
Corey Johnson
d7ee81418d Remove editor class form ReactEditorView, it is on EditorComponent
I couldn’t recreate the problem with activation events mentioned
fa66689c07
2014-06-05 14:13:41 -07:00
Nathan Sobo
2ee2efeb84 Add ReactEditorView::isFocused shim 2014-06-05 12:07:52 +09:00
Nathan Sobo
367e429162 Add ReactEditorView::setText 2014-06-05 12:03:56 +09:00
Nathan Sobo
8417dfd10e Add the ReactEditorView::updateDisplay shim 2014-06-05 12:01:09 +09:00
Nathan Sobo
15d1c5f992 Add ReactEditorView::setWidthInChars shim 2014-06-05 11:59:02 +09:00
Nathan Sobo
e0b1a0cfa7 Add ReactEditorView::getFontSize 2014-06-05 11:58:48 +09:00
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
Kevin Sawicki
68964f1ca1 🏁 Don't crash when closing spec window
Focusing the window during the blur event that fires when the
window is closed currently crashes the app on Windows.

Closes #2485
2014-06-04 14:33:39 -07:00
Kevin Sawicki
c1ebbf36be Add missing l to global 2014-06-04 09:52:20 -07:00
Kevin Sawicki
8717547db4 Normalize resource path in remaining locations 2014-06-04 09:45:27 -07:00
Kevin Sawicki
7c4a32fffa Normalize resource path in AtomWindow constructor 2014-06-04 08:46:40 -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
f103e72c01 Remove exceptions related to unassigned lineHeight
These exceptions break specs when simulateDomAttachment is used. They
were only present to ensure correct sequencing during development of the
react editor, so it's safe to remove them for now.
2014-06-04 21:05:29 +09:00
Nathan Sobo
eeb44407e3 Add ReactEditorView::getModel 2014-06-04 19:15:56 +09:00
Kevin Sawicki
b5703ff57a Normalize resource path before creating app
This ensures the drive letter case is consistent with the format
used by require.
2014-06-03 17:40:08 -07:00
Kevin Sawicki
41ab48bc6e Use path.join instead of path.resolve
This ensures the case of the path is consistent with how require resolves
paths.

Closes #2486
2014-06-03 17:19:00 -07: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
8e095d7b5b Merge pull request #2164 from steffengy/fix-indent
Fix indenting of HTML tags for instance. Fix #1294
2014-06-03 12:01:44 -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