From c7fac3456eb0fccc5e7aa039a2b4bea0cf11174b Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Sun, 24 Jul 2016 18:03:36 -0700 Subject: [PATCH] remove non-transform transforming methods from reference --- docs/reference/models/node.md | 28 +--------- docs/reference/models/selection.md | 82 +----------------------------- 2 files changed, 4 insertions(+), 106 deletions(-) diff --git a/docs/reference/models/node.md b/docs/reference/models/node.md index 6b032d2b5..5eceac228 100644 --- a/docs/reference/models/node.md +++ b/docs/reference/models/node.md @@ -9,7 +9,7 @@ - [`kind`](#kind) - [`length`](#length) - [`text`](#text) -- [Retrieval Methods](#retrieval-methods) +- [Methods](#methods) - [`filterDescendants`](#filterdescendants) - [`findDescendant`](#finddescendant) - [`getBlocksAtRange`](#getblockatrange) @@ -35,10 +35,6 @@ - [`getTextsAtRange`](#gettextsatrange) - [`hasChild`](#haschild) - [`hasDescendant`](#hasdescendant) -- [Transform Methods](#transform-methods) - - [`mapDescendants`](#mapdescendants) - - [`removeDescendant`](#removedescendant) - - [`updateDescendant`](#updatedescendant) ## Properties @@ -67,7 +63,7 @@ The sum of the lengths of all of the descendant [`Text`](./text.md) nodes of thi A concatenated string of all of the descendant [`Text`](./text.md) nodes of this node. -## Retrieval Methods +## Methods ### `filterDescendants` `filterDescendants(iterator: Function) => List` @@ -193,23 +189,3 @@ Check whether the node has a child node by `key`. `hasDescendant(key: String || Node) => Boolean` Check whether the node has a descendant node by `key`. - - -## Transform Methods - -Since nodes are immutable, all of the transform methods return a new copy of the node in question. - -### `mapDescendants` -`mapDescendants(iterator: Function) => Node` - -Map all of the descendant nodes of a node through an `iterator` function. - -### `removeDescendant` -`removeDescendant(key: String || Node) => Node` - -Remove a descendant node from the tree by `key`. - -### `updateDescendant` -`updateDescendant(node: Node) => Node` - -Update a descendant `node` to the new value. diff --git a/docs/reference/models/selection.md b/docs/reference/models/selection.md index ed8f964bb..31d6bfc5b 100644 --- a/docs/reference/models/selection.md +++ b/docs/reference/models/selection.md @@ -29,26 +29,13 @@ Often times, you don't need to specifically know which point is the "anchor" and - [`startOffset`](#startoffset) - [Static Methods](#static-methods) - [`Selection.create`](#selectioncreate) -- [Checking Methods](#checking-methods) +- [Methods](#checking-methods) - [`has{Edge}AtEndOf`](#hasedgeatendof) - [`has{Edge}AtStartOf`](#hasedgeatstartof) - [`has{Edge}Between`](#hasedgebetween) - [`has{Edge}In`](#hasedgein) - [`isAtEndOf`](#isatendof) - [`isAtStartOf`](#isatstartof) -- [Transforming Methods](#transforming-methods) - - [`blur`](blur) - - [`extendBackward`](#extendbackward) - - [`extendForward`](#extendforward) - - [`extendToEndOf`](#extendtoendof) - - [`extendToStartOf`](#extendtostartof) - - [`focus`](#focus) - - [`moveBackward`](#movebackward) - - [`moveForward`](#moveforward) - - [`moveToEndOf`](#movetoendof) - - [`moveToRangeOf`](#movetorangeof) - - [`moveToStartOf`](#movetostartof) - - [`moveTo{Edge}`](#movetoedge) ## Properties @@ -135,7 +122,7 @@ A few convenience properties for accessing the first and last point of the selec Create a new `Selection` instance with `properties`. -## Checking Methods +## Methods ### `has{Edge}AtStartOf` `has{Edge}AtStartOf(node: Node) => Boolean` @@ -166,68 +153,3 @@ Determine whether the selection is at the start of a `node`. `isAtEndOf(node: Node) => Boolean` Determine whether the selection is at the end of a `node`. - - -## Transforming Methods - -Since `Selection`s are immutable, all of the transforming methods return a new instance of the selection. - -### `blur` -`blur() => Selection` - -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` - -Change the selection's `isFocused` property to `true`. - -### `moveTo{Edge}` -`moveTo{Edge}() => Selection` - -Move both of the selection's points to an edge, collapsing it. Where `{Edge}` can be one of: `Anchor`, `Focus`, `Start` or `End`. - -### `moveToEndOf` -`moveToEndOf(node: Node) => Selection` - -Move both of the selection's points to the end of a `node`. - -### `moveToRangeOf` -`moveToRangeOf(node: Node) => Selection` - -Move the selection's anchor point to the start of a `node`, and its focus point to the end of the same `node`. - -### `moveToStartOf` -`moveToStartOf(node: Node) => Selection` - -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`. - -### `moveForward` -`moveForward([n = 1: Number]) => Selection` - -Increase the selection's `anchorOffset` and `focusOffset` by `n`, defaulting to `1`.