Commit Graph

35 Commits

Author SHA1 Message Date
sadick254
510d04bffe Use custom element on text editor element 2021-08-18 12:55:00 +03:00
Rafael Oleza
7f3f040628 Reformat all JS files using prettier 2019-05-31 18:33:56 +02:00
Jason Rudolph
9d23d37965 If a TextEditorElement has a tabIndex, use it; otherwise, use -1 2018-01-04 17:55:53 -05:00
Katrina Uychaco
aeb9af63df Store readOnly state on the TextEditor model 2017-11-28 21:14:40 -08:00
Katrina Uychaco
909caa2a59 Add 'readonly' attribute to <atom-text-editor> element 2017-11-28 20:01:31 -08:00
Nathan Sobo
1b1973db15 Rename method to match old implementation 2017-05-05 09:30:08 +02:00
Nathan Sobo
c00ad62a0e Pass mini attribute when creating new TextEditor from TextEditorElement
This avoids content being shifted over due to rendering and measuring
the gutter on element creation and then subsequently hiding it.
2017-05-05 09:30:08 +02:00
Nathan Sobo
fe13279531 Update DOM in screenPositionForPixelPosition if needed
Some packages are interacting with this method assuming this behavior,
so this commit eliminates `screenPositionForPixelPositionSync` and
instead just performs the DOM update in `screenPositionForPixelPosition`
if it is needed.
2017-05-05 09:30:08 +02:00
Antonio Scandurra
638bb78ecb Fix build failures 2017-05-05 09:29:30 +02:00
Nathan Sobo
305fd14cd9 Add TextEditorElement.pixelRectRangeForScreenRange for compatibility 2017-05-05 09:29:30 +02:00
Nathan Sobo
a5a80448cb Add intersectsVisibleRowRange on TextEditorElement 2017-05-05 09:29:30 +02:00
Nathan Sobo
b54dbb58ab Add missing methods on TextEditorElement 2017-05-05 09:29:30 +02:00
Antonio Scandurra
f45ff05306 Add {get,set}FirstVisibleScreen{Row,Column} to TextEditorElement 2017-05-05 09:29:30 +02:00
Nathan Sobo
1cc68e408e Add TextEditorComponent.screenPositionForPixelPositionSync
This method can be used to translate a pixel position to a screen
position even if the line is not currently rendered on screen.
2017-05-05 09:29:29 +02:00
Nathan Sobo
dfe647d914 Fix lint error 2017-05-05 09:29:29 +02:00
Nathan Sobo
24e03ee4e6 Fix pageUp/Down tests by using a real element 2017-05-05 09:29:29 +02:00
Antonio Scandurra
552fbf7915 Honor the gutter-hidden attribute correctly 2017-05-05 09:29:29 +02:00
Nathan Sobo
4c8fd0cb75 Add tests for TextEditorElement.setScrollTop/Left 2017-05-05 09:29:29 +02:00
Nathan Sobo
69a29b2c58 Delegate (get|set)(Height|Width) to element
Rather than storing these values on the editor model.
2017-05-05 09:29:29 +02:00
Antonio Scandurra
55950f9594 Assign placeholder text on the model only when the attribute is present
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-05-05 09:29:29 +02:00
Nathan Sobo
84c20d95d4 Add deprecated rootElement property 2017-05-05 09:29:29 +02:00
Nathan Sobo
a536c5950a Add TextEditorElement.pixelPositionForScreen/BufferPosition
These methods require us to render off-screen lines in some
circumstances in order to measure them, so this commit extends the
rendering of the longest line to include arbitrary lines.
2017-05-05 09:29:29 +02:00
Nathan Sobo
a9d0f82afb Use async/await in text-editor-element-spec 2017-05-05 09:29:29 +02:00
Nathan Sobo
e423b833db Replace getDefaultCharacterWidth with getBaseCharacterWidth
That's the language we use throughout the implementation now and a more
accurate name for the concept.
2017-05-05 09:29:29 +02:00
Nathan Sobo
174bac378d Fix lint errors 2017-05-05 09:29:29 +02:00
Nathan Sobo
c8f2fbb657 Get TextEditorElement tests passing 2017-05-05 09:29:29 +02:00
Antonio Scandurra
03702a1fe6 Add deprecated shadow root property to editor element
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-05-05 09:29:29 +02:00
Antonio Scandurra
a99237b33b Fix lint errors and delete dead code 2017-05-05 09:29:29 +02:00
Nathan Sobo
b6cd473c16 Fix typo 2017-05-05 09:29:28 +02:00
Antonio Scandurra
bc8b548d1a Add TextEditorElement.prototype.invalidateBlockDecorationDimensions 2017-05-05 09:29:28 +02:00
Nathan Sobo
5a47f179e3 Introduce synthetic scrolling
We previously thought scroll events had changed somehow to become
synchronous, but were wrong. This introduces synthetic scrolling where
we use GPU translation of the contents of the gutter and scroll
containers to simulate scrolling and explicitly capture mousewheel
events.

Still need to add dummy scrollbars and deal with their footprint in
clientHeight and clientWidth.
2017-05-05 09:29:28 +02:00
Nathan Sobo
758466c9af Make various tweaks to improve mini editors
Still a ways to go, but this is a start toward getting the mini-editors
to play nice with our existing styling.
2017-05-05 09:29:28 +02:00
Nathan Sobo
ebad2e6605 Implement detachment to eliminate spurious drag events 2017-05-05 09:29:28 +02:00
Nathan Sobo
b863790390 Start on new TextEditorComponent specs; avoid excessive line numbers 2017-05-05 09:29:27 +02:00
Nathan Sobo
f237d70357 WIP 2017-05-05 09:29:27 +02:00