Commit Graph

33 Commits

Author SHA1 Message Date
Indrek Ardel
55f3311c01 Remove unused variables 2016-09-26 20:52:13 +03:00
Antonio Scandurra
7ba9cc6329 Unfold all the folds intersecting the row when clicking fold indicators 2016-04-26 13:24:21 +02:00
Antonio Scandurra
6fed847cce Don't use atom globals in gutter components 2015-10-07 15:25:02 -05:00
Antonio Scandurra
91bb8f518d Merge branch 'master' into as-continuous-reflow 2015-09-17 16:58:37 +02:00
Antonio Scandurra
ad83a03440 Merge branch 'master' into as-recycle-nodes
# Conflicts:
#	src/line-numbers-tile-component.coffee
#	src/lines-tile-component.coffee
2015-09-15 11:50:54 +02:00
Antonio Scandurra
f86c9b2331 Let TextEditorComponent manage DOMElementPool 2015-09-15 10:58:24 +02:00
Antonio Scandurra
c8c69a99b9 Release free nodes after destroying TextEditor 2015-09-15 10:36:47 +02:00
Antonio Scandurra
f0bc6ca23a 🎨 Some renaming 2015-09-14 20:27:25 +02:00
Antonio Scandurra
93ed0853a2 Recycle gutter nodes 2015-09-14 17:25:30 +02:00
Antonio Scandurra
9eed6c7834 Add "Continuous Reflow" mode 2015-09-07 13:25:13 +02:00
Antonio Scandurra
b5c0f5ac0b Change lines container height based on boundingClientRect 2015-08-26 16:21:51 +02:00
Antonio Scandurra
d6ac7863c9 Merge branch 'master' into as-tiled-gutter 2015-06-19 20:12:43 +02:00
Antonio Scandurra
d7156ff387 Remove event listeners from orphaned gutters 2015-06-19 10:24:48 +02:00
Antonio Scandurra
a7ff49ebaa 🎨 2015-06-13 17:36:20 +02:00
Antonio Scandurra
e893b5105b Remove presenter as a dependency where possible
Although we have a couple of components which still access it, we
agreed it would have been just better to avoid relying on
`TextEditorPresenter` where possible and use it purposefully in other
places (e.g. `LinesComponent` which needs it to store text
measurements).

/cc: @jssln
2015-06-13 14:18:36 +02:00
Antonio Scandurra
6bff934b76 🎨 2015-06-12 18:22:43 +02:00
Antonio Scandurra
7ac0cdcbf5 Start porting TextEditorComponent spec 2015-06-12 18:22:33 +02:00
Antonio Scandurra
d14e7b9456 Enable maxLineNumberDigits 2015-06-12 10:41:50 +02:00
Antonio Scandurra
8abdc67e7e Revert "Use clientHeight for line-numbers and lines containers"
This reverts commit f2bab35f57c05d5a0bb21e9fb02117f802ff278b. It didn't actually
improve performance, nor memory usage, therefore I decided to avoid changing it
for the time being.
2015-06-04 15:19:42 +02:00
Antonio Scandurra
57fd553c69 Use clientHeight for line-numbers and lines containers 2015-06-04 15:18:10 +02:00
Antonio Scandurra
44991f1fb3 Make LineNumberGutterComponent a TiledComponent 2015-06-04 15:17:39 +02:00
Jess Lin
0a7f6ae187 [Gutter] Migrate LineNumberGutterComponent to consume new state format 2015-05-13 10:59:31 -07:00
Nathan Sobo
192997c8cf Clear line numbers from previous usages of the gutter element
In adding custom gutter APIs, I suggested to @jssln that we associate
the gutter model objects with DOM nodes in the view registry to make
it easy for package authors to get at the view layer for a particular
gutter. She also applied this treatment to the line numbers gutter,
which makes sense.

However, using the view registry opened up an unexpected wrinkle…

When you detach an editor, we need to tear down all the associated view
logic because at that point, we don’t know whether the element is about
to be reattached or whether it’s going to get garbage collected. In the
case where we reattach, we end up constructing a new TextEditorComponent
for the element. When this happens, the gutter component requests a DOM
node for the gutter from the view registry. Except in this case the
DOM element isn’t empty because it was already used by a different
component for the same element before it was detached. The fix is simply
to always clear out the line numbers to ensure we start in a clean
state.

@jssln: You should apply this same fix to custom gutters or we’ll see
the same issues.
2015-04-28 20:05:25 -06:00
Jess Lin
9abd0232ce [Gutter] Remove ::getName from gutter components; save names in GutterContainerComponent 2015-04-22 07:29:00 -07:00
Jess Lin
09d1b977de [Gutter] Convert ! to 'not', && to 'and' 2015-04-22 07:28:59 -07:00
Jess Lin
85188ced03 [Gutter] Move 'lineNumberGutter' state to nest under 'gutters' in the presenter state 2015-04-22 07:28:59 -07:00
Jess Lin
14e5d38354 [Gutter] TextEditorPresenter: Consolidate common gutter state under @state.gutters 2015-04-22 07:28:58 -07:00
Jess Lin
0d7f89467f [Gutter][DOM Persistence] Add ::hideNode and ::showNode to GutterComponent classes 2015-04-22 07:28:58 -07:00
Jess Lin
66f1f33861 [Gutter][View Registry] Make LineNumber- and Custom- GutterComponent get their view from the ViewRegistry 2015-04-22 07:28:58 -07:00
Jess Lin
e2e737369a [Gutter] Factor out method to set common gutter component properties 2015-04-22 07:28:58 -07:00
Jess Lin
754b38f410 [Gutter] Add ::getDomNode to LineNumberGutterComponent 2015-04-22 07:28:57 -07:00
Jess Lin
28f70c912e [Gutter] Add ::getName to LineNumberGutterComponent 2015-04-22 07:28:57 -07:00
Jess Lin
b4ffa04e4c [Gutter] Rename GutterComponent to LineNumberGutterComponent 2015-04-22 07:28:57 -07:00