From daa68dab8908dbc6eca04339307ae594a912703f Mon Sep 17 00:00:00 2001 From: Sunny Hirai Date: Sun, 10 Apr 2022 15:31:43 -0700 Subject: [PATCH] Add descriptions of affinity to PathRef, PointRef and RangeRef documentation --- docs/api/locations/path-ref.md | 3 +-- docs/api/locations/point-ref.md | 3 +-- docs/api/locations/range-ref.md | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/api/locations/path-ref.md b/docs/api/locations/path-ref.md index f27bb5c29..59c7e2353 100644 --- a/docs/api/locations/path-ref.md +++ b/docs/api/locations/path-ref.md @@ -1,7 +1,6 @@ # PathRef API -`PathRef` objects keep a specific path in a document synced over time as new operations are applied to the editor. You can access their property `current` at any time for the up-to-date `Path` value. -When you no longer need to track this location, call `unref()` to free the resources. +`PathRef` objects keep a specific path in a document synced over time as new operations are applied to the editor. It is created using the `Editor.pathRef` method. You can access their property `current` at any time for the up-to-date `Path` value. When you no longer need to track this location, call `unref()` to free the resources. The `affinity` refers to the direction the `PathRef` will go when a user inserts content at the current position of the `Path`. ```typescript interface PathRef { diff --git a/docs/api/locations/point-ref.md b/docs/api/locations/point-ref.md index 2dd132bbe..b5b0c254e 100644 --- a/docs/api/locations/point-ref.md +++ b/docs/api/locations/point-ref.md @@ -1,7 +1,6 @@ # PointRef API -`PointRef` objects keep a specific point in a document synced over time as new operations are applied to the editor. You can access their property `current` at any time for the up-to-date `Point` value. -When you no longer need to track this location, call `unref()` to free the resources. +`PointRef` objects keep a specific point in a document synced over time as new operations are applied to the editor. It is created using the `Editor.pointRef` method. You can access their property `current` at any time for the up-to-date `Point` value. When you no longer need to track this location, call `unref()` to free the resources. The `affinity` refers to the direction the `PointRef` will go when a user inserts content at the current position of the `Point`. ```typescript interface PointRef { diff --git a/docs/api/locations/range-ref.md b/docs/api/locations/range-ref.md index f8bd1b8f8..a765000dc 100644 --- a/docs/api/locations/range-ref.md +++ b/docs/api/locations/range-ref.md @@ -1,7 +1,6 @@ # RangeRef API -`RangeRef` objects keep a specific range in a document synced over time as new operations are applied to the editor. You can access their property `current` at any time for the up-to-date `Range` value. -When you no longer need to track this location, call `unref()` to free the resources. +`RangeRef` objects keep a specific range in a document synced over time as new operations are applied to the editor. It is created using the `Editor.rangeRef` method. You can access their property `current` at any time for the up-to-date `Range` value. When you no longer need to track this location, call `unref()` to free the resources. The `affinity` refers to the direction the `RangeRef` will go when a user inserts content at the edges of the `Range`. `inward` means that the `Range` tends to stay the same size when content is inserted at its edges, and `outward` meaans that the `Range` tends to grow when content is inserted at its edges. ```typescript interface RangeRef {