You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-25Lines changed: 25 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ For a more detailed explanation of this project read [this](https://hartmut-bohn
12
12
13
13
`new StretchTransform()` create an empty StretchTransform.
14
14
15
-
####addAnchor
15
+
### addAnchor
16
16
17
17
Adds an Anchor.
18
18
@@ -21,7 +21,7 @@ Adds an Anchor.
21
21
-`x`**[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** X coordinate for origin and target position
22
22
-`y`**[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Y coordinate for origin and target position
23
23
24
-
####addAnchor
24
+
### addAnchor
25
25
26
26
Adds an Anchor.
27
27
@@ -32,7 +32,7 @@ Adds an Anchor.
32
32
-`xTarget`**[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** X coordinate for target position
33
33
-`yTarget`**[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Y coordinate for target position
34
34
35
-
####addAnchor
35
+
### addAnchor
36
36
37
37
Adds an Anchor.
38
38
@@ -41,41 +41,41 @@ Adds an Anchor.
41
41
-`pOrigin`**[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** Array [x, y] for origin position
42
42
-`pTarget`**[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** Array [x, y] for target position
43
43
44
-
####addAnchor
44
+
### addAnchor
45
45
46
46
Adds an Anchor.
47
47
48
48
*Parameters*
49
49
50
50
-`p`**[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** Array [x, y] that will be used for origin and target position
51
51
52
-
####removeAnchor
52
+
### removeAnchor
53
53
54
54
Removes an Anchor.
55
55
56
56
*Parameters*
57
57
58
58
-`anchor`**Anchor** Anchor to remove
59
59
60
-
####removeAnchor
60
+
### removeAnchor
61
61
62
62
Removes an Anchor.
63
63
64
64
*Parameters*
65
65
66
66
-`i`**[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Index of the anchor
67
67
68
-
####getAnchorCount
68
+
### getAnchorCount
69
69
70
70
Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** of anchors added to the MultiTransform
71
71
72
-
####getAnchor
72
+
### getAnchor
73
73
74
74
*Parameters*
75
75
76
76
-`i`**[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Index of the anchor to return.
Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Index of the found anchor or -1 if nothing was found at the
Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Index of the found anchor or -1 if nothing was found at the
Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Index of the found anchor or -1 if nothing was found at the
109
109
specified position
110
110
111
-
####setAnchorOrigin
111
+
### setAnchorOrigin
112
112
113
113
*Parameters*
114
114
115
115
-`i`**[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Index of the anchor.
116
116
-`x`**[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** New x coordinate of the origin position.
117
117
-`y`**[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** New y coordinate of the origin position.
118
118
119
-
####setAnchorTarget
119
+
### setAnchorTarget
120
120
121
121
*Parameters*
122
122
123
123
-`i`**[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Index of the anchor.
124
124
-`x`**[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** New x coordinate of the target position.
125
125
-`y`**[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** New y coordinate of the target position.
126
126
127
-
####setWeightingMode
127
+
### setWeightingMode
128
128
129
129
*Parameters*
130
130
131
131
-`weightingMode`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** String, either 'simple' or 'directional'.
132
132
133
-
####isSimple
133
+
### isSimple
134
134
135
135
Returns **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true, if weightingMode is SIMPLE
136
136
137
-
####isDirectional
137
+
### isDirectional
138
138
139
139
Returns **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true, if weightingMode is DIRECTIONAL
Exponent of the weighting function. Defines how the relations from one anchor
148
148
to all others are cumulated. The closer the other anchor lies, the
@@ -152,11 +152,11 @@ stronger it is weighted.
152
152
153
153
-`val`**[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Usually something between 0 and 2. Default = 1.
Exponent of the weighting function that factors in, if the direction
175
175
from anchor to point and from one anchor to another is quite similar.
@@ -179,7 +179,7 @@ Only applicable when weightingMode is DIRECTIONAL.
179
179
180
180
-`val`**[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Usually something between 0 and 2. Default = 1.
181
181
182
-
####transform
182
+
### transform
183
183
184
184
Main function of the class. Transforms a point on the plane and returns
185
185
its new position.
@@ -191,7 +191,7 @@ its new position.
191
191
192
192
Returns **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** Transformed point as an Array [x, y]
193
193
194
-
####transform
194
+
### transform
195
195
196
196
Main function of the class. Transforms a point on the plane and returns
197
197
its new position.
@@ -202,7 +202,7 @@ its new position.
202
202
203
203
Returns **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** Transformed point as an Array [x, y]
204
204
205
-
####updateAnchorMatrices
205
+
### updateAnchorMatrices
206
206
207
207
It's usually not necessary to call this method. If anchors and parameters
208
208
are always set with the given methods (setAnchorOrigin(), ...), this
0 commit comments