Commit Graph

14 Commits

Author SHA1 Message Date
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
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
Corey Johnson & Nathan Sobo
3f01e2f748 Implement shouldComponentUpdate for SelectionsComponent 2014-05-16 15:31:15 -06:00
Nathan Sobo
a118cdd32b Put selections and lines on the GPU together in sibling divs 2014-05-16 15:31:14 -06:00
Nathan Sobo
ce9fe90217 Make multi-line selections appear to span the screen with a single div
Because lines are opaque and any area of a selection that overlaps a
line is actually rendered on the line itself, the screen-spanning
background of a multi-line selection can actually be rendered as a
single div spanning the entire screen from the first row to the
penultimate row of the selection.
2014-05-16 15:31:13 -06:00
Nathan Sobo
757ae6de39 Position selections relative to viewport
This is getting closer, but lines still need to be opaque. Multi-line
selections will still need to be rendered behind the line layers so they
can extend to the edge of the viewport, so this code still has value.
2014-05-16 15:31:12 -06:00
Nathan Sobo
48d90e3dfc Funnel cursor and selection updates through EditorComponent 2014-04-22 17:09:43 -06:00
Nathan Sobo
66f3f2d883 Add displayName to components 2014-04-22 17:09:42 -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
3d3b72a954 Render selections 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
c44fd62eb1 Update cursor view when selection screen position changes 2014-04-22 17:09:03 -06:00
Nathan Sobo
9c2d321327 Break out selection, cursor, and input components 2014-04-22 17:09:02 -06:00