Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Markers and Layers and Contexts #1510

Merged
merged 12 commits into from
Jun 5, 2018
Merged

Markers and Layers and Contexts #1510

merged 12 commits into from
Jun 5, 2018

Conversation

smashwilson
Copy link
Contributor

Add bridge components to the :atom: MarkerLayer and Marker APIs with React components. My goal is to be able to manipulate markers with a React tree with something like:

render() {
  return (
    <AtomTextEditor>
      <Marker range={[[11, 0], [12, 0]]}>
        <Decoration type='line' className='something' />
        <Decoration type='line-number' className='something-else' />
      </Marker>
      <MarkerLayer>
        <Marker range={[[0, 0], [10, 0]]} invalidate='never' />
        <Marker range={[[20, 0], [25, 6]]} invalidate='never' exclusive={true} />
        <Decoration type='overlay' position='head'>
           <div>
              What's up
           </div>
        </Decoration>
      </MarkerLayer>
    </AtomTextEditor>
  );
}

This will be really useful for implementing #1502.

@smashwilson smashwilson merged commit e3aa968 into master Jun 5, 2018
@smashwilson smashwilson deleted the aw/markers-and-layers branch June 5, 2018 18:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant