From 48be173b7bb97585a389da9e30ad265f04e4ca1f Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Tue, 12 Jul 2016 11:40:15 -0700 Subject: [PATCH] update reference --- docs/reference/models/selection.md | 52 +++++++++++++++--------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/reference/models/selection.md b/docs/reference/models/selection.md index 49bc3aca8..a80f71cdf 100644 --- a/docs/reference/models/selection.md +++ b/docs/reference/models/selection.md @@ -177,6 +177,26 @@ Since `Selection`s are immutable, all of the transforming methods return a new i Change the selection's `isFocused` property to `false`. +### `extendBackward` +`extendBackward([n = 1: Number]) => Selection` + +Decrease the selection's `focusOffset` by `n`, default to `1`. + +### `extendForward` +`extendForward([n = 1: Number]) => Selection` + +Increase the selection's `focusOffset` by `n`, default to `1`. + +### `extendToEndOf` +`extendToEndOf(node: Node) => Selection` + +Move the selection's `focusOffset` to the end of a `node`. + +### `extendToStartOf` +`extendToStartOf(node: Node) => Selection` + +Move the selection's `focusOffset` to the start of a `node`. + ### `focus` `focus() => Selection` @@ -187,11 +207,6 @@ Change the selection's `isFocused` property to `true`. Move both of the selection's points to an edge, collapsing it. Where `{Edge}` can be one of: `Anchor`, `Focus`, `Start` or `End`. -### `moveToStartOf` -`moveToStartOf(node: Node) => Selection` - -Move both of the selection's points to the start of a `node`. - ### `moveToEndOf` `moveToEndOf(node: Node) => Selection` @@ -202,32 +217,17 @@ Move both of the selection's points to the end of a `node`. Move the selection's anchor point to the start of a `node`, and its focus point to the end of the same `node`. -### `moveForward` -`moveForward([n = 1: Number]) => Selection` +### `moveToStartOf` +`moveToStartOf(node: Node) => Selection` -Increase the selection's `anchorOffset` and `focusOffset` by `n`, defaulting to `1`. +Move both of the selection's points to the start of a `node`. ### `moveBackward` `moveBackward([n = 1: Number]) => Selection` Decrease the selection's `anchorOffset` and `focusOffset` by `n`, defaulting to `1`. -### `extendForward` -`extendForward([n = 1: Number]) => Selection` +### `moveForward` +`moveForward([n = 1: Number]) => Selection` -Increase the selection's `focusOffset` by `n`, default to `1`. - -### `extendBackward` -`extendBackward([n = 1: Number]) => Selection` - -Decrease the selection's `focusOffset` by `n`, default to `1`. - -### `extendToStartOf` -`extendToStartOf(node: Node) => Selection` - -Move the selection's `focusOffset` to the start of a `node`. - -### `extendToEndOf` -`extendToEndOf(node: Node) => Selection` - -Move the selection's `focusOffset` to the end of a `node`. +Increase the selection's `anchorOffset` and `focusOffset` by `n`, defaulting to `1`.