-
Notifications
You must be signed in to change notification settings - Fork 63
/
word.locationrelation.yml
166 lines (132 loc) · 6.03 KB
/
word.locationrelation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
### YamlMime:TSEnum
name: Word.LocationRelation
uid: 'word!Word.LocationRelation:enum'
package: word!
fullName: Word.LocationRelation
summary: ''
remarks: >-
\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/35-ranges/compare-location.yaml
// Compares the location of one paragraph in relation to another paragraph.
await Word.run(async (context) => {
const paragraphs: Word.ParagraphCollection = context.document.body.paragraphs;
paragraphs.load("items");
await context.sync();
const firstParagraphAsRange: Word.Range = paragraphs.items[0].getRange();
const secondParagraphAsRange: Word.Range = paragraphs.items[1].getRange();
const comparedLocation = firstParagraphAsRange.compareLocationWith(secondParagraphAsRange);
await context.sync();
const locationValue: Word.LocationRelation = comparedLocation.value;
console.log(`Location of the first paragraph in relation to the second paragraph: ${locationValue}`);
});
```
isPreview: false
isDeprecated: false
fields:
- name: adjacentAfter
uid: 'word!Word.LocationRelation.adjacentAfter:member'
package: word!
summary: |-
Indicates that this instance occurs after, and is adjacent to, the range.
* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
value: '"AdjacentAfter"'
- name: adjacentBefore
uid: 'word!Word.LocationRelation.adjacentBefore:member'
package: word!
summary: |-
Indicates that this instance occurs before, and is adjacent to, the range.
* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
value: '"AdjacentBefore"'
- name: after
uid: 'word!Word.LocationRelation.after:member'
package: word!
summary: |-
Indicates that this instance occurs after the range.
* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
value: '"After"'
- name: before
uid: 'word!Word.LocationRelation.before:member'
package: word!
summary: |-
Indicates that this instance occurs before the range.
* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
value: '"Before"'
- name: contains
uid: 'word!Word.LocationRelation.contains:member'
package: word!
summary: >-
Indicates that this instance contains the range, with the exception of the start and end character of this
instance.
* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
value: '"Contains"'
- name: containsEnd
uid: 'word!Word.LocationRelation.containsEnd:member'
package: word!
summary: >-
Indicates that this instance contains the range and that it shares the same end character. The range doesn't share
the same start character as this instance.
* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
value: '"ContainsEnd"'
- name: containsStart
uid: 'word!Word.LocationRelation.containsStart:member'
package: word!
summary: >-
Indicates that this instance contains the range and that it shares the same start character. The range doesn't
share the same end character as this instance.
* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
value: '"ContainsStart"'
- name: equal
uid: 'word!Word.LocationRelation.equal:member'
package: word!
summary: |-
Indicates that this instance and the range represent the same range.
* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
value: '"Equal"'
- name: inside
uid: 'word!Word.LocationRelation.inside:member'
package: word!
summary: >-
Indicates that this instance is inside the range. The range doesn't share the same start and end characters as
this instance.
* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
value: '"Inside"'
- name: insideEnd
uid: 'word!Word.LocationRelation.insideEnd:member'
package: word!
summary: >-
Indicates that this instance is inside the range and that it shares the same end character. The range doesn't
share the same start character as this instance.
* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
value: '"InsideEnd"'
- name: insideStart
uid: 'word!Word.LocationRelation.insideStart:member'
package: word!
summary: >-
Indicates that this instance is inside the range and that it shares the same start character. The range doesn't
share the same end character as this instance.
* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
value: '"InsideStart"'
- name: overlapsAfter
uid: 'word!Word.LocationRelation.overlapsAfter:member'
package: word!
summary: |-
Indicates that this instance starts inside the range and overlaps the range’s last character.
* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
value: '"OverlapsAfter"'
- name: overlapsBefore
uid: 'word!Word.LocationRelation.overlapsBefore:member'
package: word!
summary: |-
Indicates that this instance starts before the range and overlaps the range's first character.
* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
value: '"OverlapsBefore"'
- name: unrelated
uid: 'word!Word.LocationRelation.unrelated:member'
package: word!
summary: |-
Indicates that this instance and the range are in different sub-documents.
* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
value: '"Unrelated"'