@pie-lib/tools 0.9.22 → 0.9.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +51 -238
- package/lib/anchor-utils.js +3 -3
- package/lib/anchor-utils.js.map +1 -1
- package/lib/anchor.js +3 -3
- package/lib/anchor.js.map +1 -1
- package/lib/index.js +10 -6
- package/lib/index.js.map +1 -1
- package/lib/protractor/graphic.js +37 -44
- package/lib/protractor/graphic.js.map +1 -1
- package/lib/protractor/index.js +28 -36
- package/lib/protractor/index.js.map +1 -1
- package/lib/rotatable.js +42 -60
- package/lib/rotatable.js.map +1 -1
- package/lib/ruler/graphic.js +29 -36
- package/lib/ruler/graphic.js.map +1 -1
- package/lib/ruler/index.js +29 -37
- package/lib/ruler/index.js.map +1 -1
- package/lib/ruler/unit-type.js +8 -8
- package/lib/ruler/unit-type.js.map +1 -1
- package/lib/ruler/unit.js +32 -39
- package/lib/ruler/unit.js.map +1 -1
- package/lib/style-utils.js +2 -1
- package/lib/style-utils.js.map +1 -1
- package/lib/transform-origin.js.map +1 -1
- package/package.json +3 -3
- package/src/anchor-utils.js +7 -7
- package/src/anchor.jsx +4 -4
- package/src/protractor/graphic.jsx +20 -39
- package/src/protractor/index.jsx +9 -9
- package/src/rotatable.jsx +34 -34
- package/src/ruler/graphic.jsx +8 -17
- package/src/ruler/index.jsx +12 -22
- package/src/ruler/unit-type.jsx +5 -5
- package/src/ruler/unit.jsx +12 -12
- package/src/style-utils.js +2 -2
- package/src/transform-origin.jsx +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [0.9.
|
|
6
|
+
## [0.9.25](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.24...@pie-lib/tools@0.9.25) (2022-11-23)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @pie-lib/tools
|
|
9
9
|
|
|
@@ -11,497 +11,310 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
## [0.9.
|
|
14
|
+
## [0.9.24](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.22...@pie-lib/tools@0.9.24) (2021-06-25)
|
|
15
15
|
|
|
16
16
|
**Note:** Version bump only for package @pie-lib/tools
|
|
17
17
|
|
|
18
|
+
## [0.9.22](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.21...@pie-lib/tools@0.9.22) (2021-02-15)
|
|
18
19
|
|
|
20
|
+
**Note:** Version bump only for package @pie-lib/tools
|
|
19
21
|
|
|
22
|
+
## [0.9.21](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.19...@pie-lib/tools@0.9.21) (2021-02-15)
|
|
20
23
|
|
|
24
|
+
**Note:** Version bump only for package @pie-lib/tools
|
|
21
25
|
|
|
22
26
|
## [0.9.19](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.18...@pie-lib/tools@0.9.19) (2020-04-14)
|
|
23
27
|
|
|
24
28
|
**Note:** Version bump only for package @pie-lib/tools
|
|
25
29
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
30
|
## [0.9.18](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.17...@pie-lib/tools@0.9.18) (2020-04-08)
|
|
31
31
|
|
|
32
32
|
**Note:** Version bump only for package @pie-lib/tools
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
34
|
## [0.9.17](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.16...@pie-lib/tools@0.9.17) (2020-03-31)
|
|
39
35
|
|
|
40
36
|
**Note:** Version bump only for package @pie-lib/tools
|
|
41
37
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
38
|
## [0.9.16](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.15...@pie-lib/tools@0.9.16) (2020-03-31)
|
|
47
39
|
|
|
48
40
|
**Note:** Version bump only for package @pie-lib/tools
|
|
49
41
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
42
|
## [0.9.15](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.14...@pie-lib/tools@0.9.15) (2020-03-31)
|
|
55
43
|
|
|
56
44
|
**Note:** Version bump only for package @pie-lib/tools
|
|
57
45
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
46
|
## [0.9.14](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.13...@pie-lib/tools@0.9.14) (2020-03-30)
|
|
63
47
|
|
|
64
48
|
**Note:** Version bump only for package @pie-lib/tools
|
|
65
49
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
50
|
## [0.9.13](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.12...@pie-lib/tools@0.9.13) (2020-03-30)
|
|
71
51
|
|
|
72
52
|
**Note:** Version bump only for package @pie-lib/tools
|
|
73
53
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
54
|
## [0.9.12](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.11...@pie-lib/tools@0.9.12) (2020-03-30)
|
|
79
55
|
|
|
80
56
|
**Note:** Version bump only for package @pie-lib/tools
|
|
81
57
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
58
|
## [0.9.11](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.10...@pie-lib/tools@0.9.11) (2020-03-30)
|
|
87
59
|
|
|
88
60
|
**Note:** Version bump only for package @pie-lib/tools
|
|
89
61
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
62
|
## [0.9.10](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.9...@pie-lib/tools@0.9.10) (2020-03-30)
|
|
95
63
|
|
|
96
64
|
**Note:** Version bump only for package @pie-lib/tools
|
|
97
65
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
66
|
## [0.9.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.8...@pie-lib/tools@0.9.9) (2020-03-30)
|
|
103
67
|
|
|
104
68
|
**Note:** Version bump only for package @pie-lib/tools
|
|
105
69
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
70
|
## [0.9.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.7...@pie-lib/tools@0.9.8) (2020-03-30)
|
|
111
71
|
|
|
112
|
-
|
|
113
72
|
### Bug Fixes
|
|
114
73
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
74
|
+
- add module prop to package.json ([09543ca](https://github.com/pie-framework/pie-lib/commit/09543ca))
|
|
120
75
|
|
|
121
76
|
## [0.9.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.6...@pie-lib/tools@0.9.7) (2020-03-18)
|
|
122
77
|
|
|
123
78
|
**Note:** Version bump only for package @pie-lib/tools
|
|
124
79
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
80
|
## [0.9.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.5...@pie-lib/tools@0.9.6) (2020-02-11)
|
|
130
81
|
|
|
131
82
|
**Note:** Version bump only for package @pie-lib/tools
|
|
132
83
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
84
|
## [0.9.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.4...@pie-lib/tools@0.9.5) (2019-08-21)
|
|
138
85
|
|
|
139
86
|
**Note:** Version bump only for package @pie-lib/tools
|
|
140
87
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
88
|
## [0.9.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.3...@pie-lib/tools@0.9.4) (2019-07-08)
|
|
146
89
|
|
|
147
90
|
**Note:** Version bump only for package @pie-lib/tools
|
|
148
91
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
92
|
## [0.9.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.2...@pie-lib/tools@0.9.3) (2019-07-05)
|
|
154
93
|
|
|
155
94
|
**Note:** Version bump only for package @pie-lib/tools
|
|
156
95
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
96
|
## [0.9.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.1...@pie-lib/tools@0.9.2) (2019-07-02)
|
|
162
97
|
|
|
163
98
|
**Note:** Version bump only for package @pie-lib/tools
|
|
164
99
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
100
|
## [0.9.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.9.0...@pie-lib/tools@0.9.1) (2019-06-17)
|
|
170
101
|
|
|
171
102
|
**Note:** Version bump only for package @pie-lib/tools
|
|
172
103
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
104
|
# [0.9.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.8.11...@pie-lib/tools@0.9.0) (2019-06-12)
|
|
178
105
|
|
|
179
|
-
|
|
180
106
|
### Features
|
|
181
107
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
108
|
+
- version bumps ([23eb54f](https://github.com/pie-framework/pie-lib/commit/23eb54f))
|
|
187
109
|
|
|
188
110
|
## [0.8.11](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.8.10...@pie-lib/tools@0.8.11) (2019-03-15)
|
|
189
111
|
|
|
190
|
-
|
|
191
112
|
### Bug Fixes
|
|
192
113
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
114
|
+
- rm child prepack in favour of root prepack ([381d8d6](https://github.com/pie-framework/pie-lib/commit/381d8d6))
|
|
198
115
|
|
|
199
116
|
## [0.8.10](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.8.9...@pie-lib/tools@0.8.10) (2019-03-14)
|
|
200
117
|
|
|
201
118
|
**Note:** Version bump only for package @pie-lib/tools
|
|
202
119
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
120
|
## [0.8.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.8.8...@pie-lib/tools@0.8.9) (2019-03-14)
|
|
208
121
|
|
|
209
122
|
**Note:** Version bump only for package @pie-lib/tools
|
|
210
123
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
124
|
## [0.8.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.8.7...@pie-lib/tools@0.8.8) (2019-03-14)
|
|
216
125
|
|
|
217
126
|
**Note:** Version bump only for package @pie-lib/tools
|
|
218
127
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
128
|
## [0.8.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.8.6...@pie-lib/tools@0.8.7) (2019-03-14)
|
|
224
129
|
|
|
225
130
|
**Note:** Version bump only for package @pie-lib/tools
|
|
226
131
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
132
|
## [0.8.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.8.5...@pie-lib/tools@0.8.6) (2019-03-13)
|
|
232
133
|
|
|
233
134
|
**Note:** Version bump only for package @pie-lib/tools
|
|
234
135
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
136
|
## [0.8.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.8.4...@pie-lib/tools@0.8.5) (2019-03-13)
|
|
240
137
|
|
|
241
138
|
**Note:** Version bump only for package @pie-lib/tools
|
|
242
139
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
140
|
## [0.8.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.8.3...@pie-lib/tools@0.8.4) (2019-03-13)
|
|
248
141
|
|
|
249
142
|
**Note:** Version bump only for package @pie-lib/tools
|
|
250
143
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
144
|
## [0.8.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.8.2...@pie-lib/tools@0.8.3) (2019-03-12)
|
|
256
145
|
|
|
257
|
-
|
|
258
146
|
### Bug Fixes
|
|
259
147
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
148
|
+
- unfoo fix ([75c78bf](https://github.com/pie-framework/pie-lib/commit/75c78bf))
|
|
265
149
|
|
|
266
150
|
## [0.8.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.8.1...@pie-lib/tools@0.8.2) (2019-03-12)
|
|
267
151
|
|
|
268
|
-
|
|
269
152
|
### Bug Fixes
|
|
270
153
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
154
|
+
- foo fix ([f54d013](https://github.com/pie-framework/pie-lib/commit/f54d013))
|
|
276
155
|
|
|
277
156
|
## [0.8.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.8.0...@pie-lib/tools@0.8.1) (2019-01-30)
|
|
278
157
|
|
|
279
158
|
**Note:** Version bump only for package @pie-lib/tools
|
|
280
159
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
160
|
# [0.8.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.7.4...@pie-lib/tools@0.8.0) (2019-01-30)
|
|
286
161
|
|
|
287
|
-
|
|
288
162
|
### Features
|
|
289
163
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
164
|
+
- libs version bump ([f9861fc](https://github.com/pie-framework/pie-lib/commit/f9861fc))
|
|
295
165
|
|
|
296
166
|
<a name="0.7.4"></a>
|
|
297
|
-
## [0.7.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.7.3...@pie-lib/tools@0.7.4) (2018-11-16)
|
|
298
167
|
|
|
168
|
+
## [0.7.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.7.3...@pie-lib/tools@0.7.4) (2018-11-16)
|
|
299
169
|
|
|
300
170
|
### Bug Fixes
|
|
301
171
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
172
|
+
- add assert package ([02f13bd](https://github.com/pie-framework/pie-lib/commit/02f13bd))
|
|
307
173
|
|
|
308
174
|
<a name="0.7.3"></a>
|
|
309
|
-
## [0.7.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.7.2...@pie-lib/tools@0.7.3) (2018-09-12)
|
|
310
175
|
|
|
176
|
+
## [0.7.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.7.2...@pie-lib/tools@0.7.3) (2018-09-12)
|
|
311
177
|
|
|
312
178
|
### Bug Fixes
|
|
313
179
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
180
|
+
- githead ([3e485e0](https://github.com/pie-framework/pie-lib/commit/3e485e0))
|
|
181
|
+
- rm githead ([a1523aa](https://github.com/pie-framework/pie-lib/commit/a1523aa))
|
|
319
182
|
|
|
320
183
|
<a name="0.7.2"></a>
|
|
184
|
+
|
|
321
185
|
## [0.7.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.7.0...@pie-lib/tools@0.7.2) (2018-09-12)
|
|
322
186
|
|
|
323
187
|
**Note:** Version bump only for package @pie-lib/tools
|
|
324
188
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
189
|
<a name="0.7.1"></a>
|
|
190
|
+
|
|
330
191
|
## [0.7.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.7.0...@pie-lib/tools@0.7.1) (2018-09-12)
|
|
331
192
|
|
|
332
193
|
**Note:** Version bump only for package @pie-lib/tools
|
|
333
194
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
195
|
<a name="0.7.0"></a>
|
|
339
|
-
# [0.7.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.6.2...@pie-lib/tools@0.7.0) (2018-05-16)
|
|
340
196
|
|
|
197
|
+
# [0.7.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.6.2...@pie-lib/tools@0.7.0) (2018-05-16)
|
|
341
198
|
|
|
342
199
|
### Features
|
|
343
200
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
201
|
+
- upgrade material-ui -> [@material-ui](https://github.com/material-ui)/core@^1.0.0-rc.1 ([017ef63](https://github.com/pie-framework/pie-lib/commit/017ef63))
|
|
348
202
|
|
|
349
203
|
<a name="0.6.2"></a>
|
|
350
|
-
## [0.6.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.6.1...@pie-lib/tools@0.6.2) (2018-05-09)
|
|
351
204
|
|
|
205
|
+
## [0.6.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.6.1...@pie-lib/tools@0.6.2) (2018-05-09)
|
|
352
206
|
|
|
353
207
|
### Bug Fixes
|
|
354
208
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
209
|
+
- **lint:** lint fixes ([f059583](https://github.com/pie-framework/pie-lib/commit/f059583))
|
|
359
210
|
|
|
360
211
|
<a name="0.6.1"></a>
|
|
361
|
-
## [0.6.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.6.0...@pie-lib/tools@0.6.1) (2018-05-09)
|
|
362
212
|
|
|
213
|
+
## [0.6.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.6.0...@pie-lib/tools@0.6.1) (2018-05-09)
|
|
363
214
|
|
|
364
215
|
### Bug Fixes
|
|
365
216
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
217
|
+
- **test:** fix test run ([d15ac94](https://github.com/pie-framework/pie-lib/commit/d15ac94))
|
|
370
218
|
|
|
371
219
|
<a name="0.6.0"></a>
|
|
372
|
-
# [0.6.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.5.3...@pie-lib/tools@0.6.0) (2018-05-08)
|
|
373
220
|
|
|
221
|
+
# [0.6.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.5.3...@pie-lib/tools@0.6.0) (2018-05-08)
|
|
374
222
|
|
|
375
223
|
### Features
|
|
376
224
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
225
|
+
- **text-select:** Add new text-select package. ([3916c19](https://github.com/pie-framework/pie-lib/commit/3916c19))
|
|
381
226
|
|
|
382
227
|
<a name="0.5.3"></a>
|
|
383
|
-
## [0.5.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.5.1...@pie-lib/tools@0.5.3) (2018-05-08)
|
|
384
228
|
|
|
229
|
+
## [0.5.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.5.1...@pie-lib/tools@0.5.3) (2018-05-08)
|
|
385
230
|
|
|
386
231
|
### Bug Fixes
|
|
387
232
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
233
|
+
- **build:** trigger rebuild ([9357023](https://github.com/pie-framework/pie-lib/commit/9357023))
|
|
392
234
|
|
|
393
235
|
<a name="0.5.1"></a>
|
|
394
|
-
## [0.5.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.5.0...@pie-lib/tools@0.5.1) (2018-05-02)
|
|
395
|
-
|
|
396
|
-
|
|
397
236
|
|
|
237
|
+
## [0.5.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.5.0...@pie-lib/tools@0.5.1) (2018-05-02)
|
|
398
238
|
|
|
399
239
|
**Note:** Version bump only for package @pie-lib/tools
|
|
400
240
|
|
|
401
241
|
<a name="0.5.0"></a>
|
|
402
|
-
# [0.5.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.4.0...@pie-lib/tools@0.5.0) (2018-05-01)
|
|
403
242
|
|
|
243
|
+
# [0.5.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.4.0...@pie-lib/tools@0.5.0) (2018-05-01)
|
|
404
244
|
|
|
405
245
|
### Features
|
|
406
246
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
247
|
+
- **ruler:** add label and tickCount (only for imperial measure) ([9c9069a](https://github.com/pie-framework/pie-lib/commit/9c9069a))
|
|
411
248
|
|
|
412
249
|
<a name="0.4.0"></a>
|
|
413
|
-
# [0.4.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.3.0...@pie-lib/tools@0.4.0) (2018-05-01)
|
|
414
250
|
|
|
251
|
+
# [0.4.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.3.0...@pie-lib/tools@0.4.0) (2018-05-01)
|
|
415
252
|
|
|
416
253
|
### Features
|
|
417
254
|
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
255
|
+
- **ruler:** move handles away from ticks ([85353fb](https://github.com/pie-framework/pie-lib/commit/85353fb))
|
|
422
256
|
|
|
423
257
|
<a name="0.3.0"></a>
|
|
424
|
-
# [0.3.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.2.2...@pie-lib/tools@0.3.0) (2018-05-01)
|
|
425
258
|
|
|
259
|
+
# [0.3.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.2.2...@pie-lib/tools@0.3.0) (2018-05-01)
|
|
426
260
|
|
|
427
261
|
### Features
|
|
428
262
|
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
263
|
+
- **ruler:** add className and startPosition ([bca0544](https://github.com/pie-framework/pie-lib/commit/bca0544))
|
|
433
264
|
|
|
434
265
|
<a name="0.2.2"></a>
|
|
435
|
-
## [0.2.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.2.1...@pie-lib/tools@0.2.2) (2018-04-30)
|
|
436
266
|
|
|
267
|
+
## [0.2.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.2.1...@pie-lib/tools@0.2.2) (2018-04-30)
|
|
437
268
|
|
|
438
269
|
### Bug Fixes
|
|
439
270
|
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
271
|
+
- **protractor:** move lines out of circle ([505178d](https://github.com/pie-framework/pie-lib/commit/505178d))
|
|
444
272
|
|
|
445
273
|
<a name="0.2.1"></a>
|
|
446
|
-
## [0.2.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.2.0...@pie-lib/tools@0.2.1) (2018-04-30)
|
|
447
274
|
|
|
275
|
+
## [0.2.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.2.0...@pie-lib/tools@0.2.1) (2018-04-30)
|
|
448
276
|
|
|
449
277
|
### Bug Fixes
|
|
450
278
|
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
279
|
+
- **protractor:** make center circle transparent ([e748293](https://github.com/pie-framework/pie-lib/commit/e748293))
|
|
455
280
|
|
|
456
281
|
<a name="0.2.0"></a>
|
|
457
|
-
# [0.2.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.1.3...@pie-lib/tools@0.2.0) (2018-04-30)
|
|
458
282
|
|
|
283
|
+
# [0.2.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.1.3...@pie-lib/tools@0.2.0) (2018-04-30)
|
|
459
284
|
|
|
460
285
|
### Features
|
|
461
286
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
287
|
+
- **rotatable:** add startPosition and className ([4e93991](https://github.com/pie-framework/pie-lib/commit/4e93991))
|
|
466
288
|
|
|
467
289
|
<a name="0.1.3"></a>
|
|
468
|
-
## [0.1.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.1.2...@pie-lib/tools@0.1.3) (2018-04-30)
|
|
469
290
|
|
|
291
|
+
## [0.1.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.1.2...@pie-lib/tools@0.1.3) (2018-04-30)
|
|
470
292
|
|
|
471
293
|
### Bug Fixes
|
|
472
294
|
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
295
|
+
- **dependencies:** set material-ui version to ^1.0.0-beta.44 ([6fd66bc](https://github.com/pie-framework/pie-lib/commit/6fd66bc))
|
|
477
296
|
|
|
478
297
|
<a name="0.1.2"></a>
|
|
479
|
-
## [0.1.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.1.1...@pie-lib/tools@0.1.2) (2018-04-30)
|
|
480
298
|
|
|
299
|
+
## [0.1.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.1.1...@pie-lib/tools@0.1.2) (2018-04-30)
|
|
481
300
|
|
|
482
301
|
### Bug Fixes
|
|
483
302
|
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
303
|
+
- **dependencies:** lock material-ui to 1.0.0-beta.44 ([60df8e6](https://github.com/pie-framework/pie-lib/commit/60df8e6))
|
|
488
304
|
|
|
489
305
|
<a name="0.1.1"></a>
|
|
490
|
-
## [0.1.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.1.0...@pie-lib/tools@0.1.1) (2018-04-30)
|
|
491
306
|
|
|
307
|
+
## [0.1.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/tools@0.1.0...@pie-lib/tools@0.1.1) (2018-04-30)
|
|
492
308
|
|
|
493
309
|
### Bug Fixes
|
|
494
310
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
311
|
+
- **dependencies:** lock material-ui to 1.0.0-beta.43 ([2a3e087](https://github.com/pie-framework/pie-lib/commit/2a3e087))
|
|
312
|
+
- **dependencies:** upgrade material-ui ([b94b50e](https://github.com/pie-framework/pie-lib/commit/b94b50e))
|
|
500
313
|
|
|
501
314
|
<a name="0.1.0"></a>
|
|
502
|
-
# 0.1.0 (2018-04-30)
|
|
503
315
|
|
|
316
|
+
# 0.1.0 (2018-04-30)
|
|
504
317
|
|
|
505
318
|
### Features
|
|
506
319
|
|
|
507
|
-
|
|
320
|
+
- **tools:** Add new 'tools' package. ([9217d0c](https://github.com/pie-framework/pie-lib/commit/9217d0c))
|
package/lib/anchor-utils.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
|
-
exports.
|
|
8
|
+
exports.toRadians = exports.toPoint = exports.toDegrees = exports.normalizeAngle = exports.getXAndY = exports.getTop = exports.getLeft = exports.getAngleAndHypotenuse = exports.getAnchor = exports.distanceBetween = exports.arctangent = void 0;
|
|
7
9
|
|
|
8
10
|
var _trigonometryCalculator = require("trigonometry-calculator");
|
|
9
11
|
|
|
@@ -13,8 +15,6 @@ var _debug = _interopRequireDefault(require("debug"));
|
|
|
13
15
|
|
|
14
16
|
var _transformOrigin = require("./transform-origin");
|
|
15
17
|
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
-
|
|
18
18
|
var log = (0, _debug["default"])('@pie-lib:tools:anchor-utils');
|
|
19
19
|
|
|
20
20
|
var toDegrees = function toDegrees(radians) {
|
package/lib/anchor-utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/anchor-utils.js"],"names":["log","toDegrees","radians","Math","PI","toRadians","degrees","normalizeAngle","a","toPoint","rect","edge","out","Point","x","y","distanceBetween","from","to","center","width","height","fromCenter","rotateAround","toCenter","diff","sub","getXAndY","corner","point","arctangent","atan2","getAngleAndHypotenuse","hypotenuse","sqrt","pow","getPosition","side","angle","calcAngle","points","anglePoints","key","ra","t","angles","sides","getTop","abs","getLeft","getAnchor","Error","top","left"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;AACA,IAAMA,GAAG,GAAG,uBAAM,6BAAN,CAAZ;;AAEO,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAAAC,OAAO;AAAA,SAAIA,OAAO,IAAI,MAAMC,IAAI,CAACC,EAAf,CAAX;AAAA,CAAzB;;;;AACA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAAAC,OAAO;AAAA,SAAIA,OAAO,IAAIH,IAAI,CAACC,EAAL,GAAU,GAAd,CAAX;AAAA,CAAzB;;;;AAEA,IAAMG,cAAc,GAAG,SAAjBA,cAAiB,CAAAC,CAAC,EAAI;AACjC,MAAIA,CAAC,GAAG,GAAR,EAAa;AACX,WAAOA,CAAC,GAAG,GAAX;AACD,GAFD,MAEO,IAAIA,CAAC,GAAG,CAAR,EAAW;AAChB,WAAO,MAAOA,CAAC,GAAG,GAAlB;AACD;;AACD,SAAOA,CAAP;AACD,CAPM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AD,EAAOmB,KAAP,EAAcrB,CAAd,CAAlB;AACA,MAAM6C,IAAI,GAAGJ,OAAO,CAACvC,IAAD,EAAOmB,KAAP,EAAcrB,CAAd,CAApB;AAEAR,EAAAA,GAAG,CAAC,mBAAD,EAAsBoD,GAAtB,EAA2B,QAA3B,EAAqCC,IAArC,CAAH;AACA,SAAO;AAAED,IAAAA,GAAG,EAAHA,GAAF;AAAOC,IAAAA,IAAI,EAAJA;AAAP,GAAP;AACD,CAdM;;;;AAgBP,IAAMZ,WAAW,GAAG,SAAdA,WAAc,CAAAH,KAAK,EAAI;AAC3B,MAAIA,KAAK,IAAI,EAAb,EAAiB;AACf,WAAO;AAAEc,MAAAA,GAAG,EAAE,UAAP;AAAmBC,MAAAA,IAAI,EAAE;AAAzB,KAAP;AACD,GAFD,MAEO,IAAIf,KAAK,GAAG,EAAR,IAAcA,KAAK,IAAI,GAA3B,EAAgC;AACrC,WAAO;AAAEc,MAAAA,GAAG,EAAE,aAAP;AAAsBC,MAAAA,IAAI,EAAE;AAA5B,KAAP;AACD,GAFM,MAEA,IAAIf,KAAK,GAAG,GAAR,IAAeA,KAAK,IAAI,GAA5B,EAAiC;AACtC,WAAO;AAAEc,MAAAA,GAAG,EAAE,cAAP;AAAuBC,MAAAA,IAAI,EAAE;AAA7B,KAAP;AACD,GAFM,MAEA,IAAIf,KAAK,GAAG,GAAR,IAAeA,KAAK,GAAG,GAA3B,EAAgC;AACrC,WAAO;AAAEc,MAAAA,GAAG,EAAE,WAAP;AAAoBC,MAAAA,IAAI,EAAE;AAA1B,KAAP;AACD;AACF,CAVD","sourcesContent":["import { trigCalculator } from 'trigonometry-calculator';\nimport Point from '@mapbox/point-geometry';\nimport debug from 'debug';\nimport { parse as parseOrigin } from './transform-origin';\nconst log = debug('@pie-lib:tools:anchor-utils');\n\nexport const toDegrees = radians => radians * (180 / Math.PI);\nexport const toRadians = degrees => degrees * (Math.PI / 180);\n\nexport const normalizeAngle = a => {\n if (a > 360) {\n return a % 360;\n } else if (a < 0) {\n return 360 + (a % 360);\n }\n return a;\n};\n\nexport const toPoint = (rect, edge) => {\n const out = parseOrigin(rect, edge);\n return new Point(out.x, out.y);\n};\n\n/**\n * Get the distance between to anchor points in a rect.\n * @param {{width: number, height: number}} rect - the rect\n * @param {number} degrees - the degrees\n * @param {string} from - from anchor\n * @param {string} to - to anchor\n * @returns {Point} point - the distance as a Point\n */\nexport const distanceBetween = (rect, degrees, from, to) => {\n const center = new Point(rect.width / 2, rect.height / 2);\n const radians = toRadians(degrees);\n const fromCenter = center.rotateAround(radians, toPoint(rect, from));\n const toCenter = center.rotateAround(radians, toPoint(rect, to));\n const diff = fromCenter.sub(toCenter);\n return diff;\n};\n\n/**\n * For a corner string, a point and a rect, return a relative x,y from that point to a corner.\n * Note that the y value descends as it goes down (unlike for a screen's y value), so this is only really useful for math functions.\n * @example\n * ```\n * getXAndY('top-left', {width: 100, height: 100}, 10, 10) //=> {x:10, y: -90}\n * ```\n * @param {*} corner\n * @param {*} rect\n * @param {*} point\n */\nexport const getXAndY = (corner, rect, point) => {\n if (corner === 'top-left') {\n const x = point.x * -1;\n const y = point.y;\n return { x, y };\n } else if (corner === 'bottom-left') {\n const x = point.x * -1;\n const y = point.y - rect.height;\n return { x, y };\n } else if (corner === 'top-right') {\n const x = rect.width - point.x;\n const y = point.y;\n return { x, y };\n } else if (corner === 'bottom-right') {\n const x = rect.width - point.x;\n const y = point.y - rect.height;\n return { x, y };\n }\n};\n\nexport const arctangent = (x, y) => toDegrees(Math.atan2(x, y));\n\nexport const getAngleAndHypotenuse = (corner, rect, point) => {\n const { x, y } = getXAndY(corner, rect, point);\n const degrees = arctangent(x, y);\n const hypotenuse = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));\n return { x, y, degrees, hypotenuse };\n};\n\nconst getPosition = (side, rect, point, angle, calcAngle) => {\n if (angle === 0) {\n return side === 'left' ? point.x : point.y;\n }\n const points = anglePoints(angle);\n const key = points[side];\n\n const { degrees, hypotenuse } = getAngleAndHypotenuse(key, rect, point);\n\n const ra = calcAngle(degrees);\n\n if (ra === 0) {\n return hypotenuse;\n }\n\n const t = {\n angles: { 0: ra, 1: 90 },\n sides: { 1: hypotenuse }\n };\n const out = trigCalculator(t);\n return out.sides[2];\n};\n\nexport const getTop = (rect, point, angle) => {\n return getPosition('top', rect, point, angle, degrees => {\n return Math.abs(angle + degrees);\n });\n};\n\nexport const getLeft = (rect, point, angle) => {\n return getPosition('left', rect, point, angle, degrees => {\n return Math.abs(angle + degrees + 90);\n });\n};\n\n/**\n * Calculate the position of an anchor within a bounding rect, if the source rect has been rotated by an angle.\n * It does this by finding the appropriate corner of the src rect, that touches the bounding rect, calculates\n * the hypotenuse (h) of that anchor to that point. Then using that plus the rotation it calculates\n * the sides of the triangle and returns the length of the side that touches the bounding rect.\n * @param {{width: number, height: number}} rect - the rect which contains the point\n * @param {{x:number, y: number}} point - the point within the rect\n * @param {number} angle - the angle in degrees that the rect has rotated.\n * @returns {{left: number, top: number}} position\n */\nexport const getAnchor = (rect, point, angle) => {\n log('[getAnchor] rect: ', rect, 'point:', point, 'angle: ', angle);\n if (point.x > rect.width) {\n throw new Error(`x: ${point.x} cannot be greater than width: ${rect.width}`);\n }\n if (point.y > rect.height) {\n throw new Error(`y: ${point.y} cannot be greater than height: ${rect.height}`);\n }\n const a = normalizeAngle(angle);\n const top = getTop(rect, point, a);\n const left = getLeft(rect, point, a);\n\n log('[getAnchor] top: ', top, 'left: ', left);\n return { top, left };\n};\n\nconst anglePoints = angle => {\n if (angle <= 90) {\n return { top: 'top-left', left: 'bottom-left' };\n } else if (angle > 90 && angle <= 180) {\n return { top: 'bottom-left', left: 'bottom-right' };\n } else if (angle > 180 && angle <= 270) {\n return { top: 'bottom-right', left: 'top-right' };\n } else if (angle > 270 && angle < 360) {\n return { top: 'top-right', left: 'top-left' };\n }\n};\n"],"file":"anchor-utils.js"}
|
|
1
|
+
{"version":3,"sources":["../src/anchor-utils.js"],"names":["log","toDegrees","radians","Math","PI","toRadians","degrees","normalizeAngle","a","toPoint","rect","edge","out","Point","x","y","distanceBetween","from","to","center","width","height","fromCenter","rotateAround","toCenter","diff","sub","getXAndY","corner","point","arctangent","atan2","getAngleAndHypotenuse","hypotenuse","sqrt","pow","getPosition","side","angle","calcAngle","points","anglePoints","key","ra","t","angles","sides","getTop","abs","getLeft","getAnchor","Error","top","left"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA,IAAMA,GAAG,GAAG,uBAAM,6BAAN,CAAZ;;AAEO,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAACC,OAAD;AAAA,SAAaA,OAAO,IAAI,MAAMC,IAAI,CAACC,EAAf,CAApB;AAAA,CAAlB;;;;AACA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAACC,OAAD;AAAA,SAAaA,OAAO,IAAIH,IAAI,CAACC,EAAL,GAAU,GAAd,CAApB;AAAA,CAAlB;;;;AAEA,IAAMG,cAAc,GAAG,SAAjBA,cAAiB,CAACC,CAAD,EAAO;AACnC,MAAIA,CAAC,GAAG,GAAR,EAAa;AACX,WAAOA,CAAC,GAAG,GAAX;AACD,GAFD,MAEO,IAAIA,CAAC,GAAG,CAAR,EAAW;AAChB,WAAO,MAAOA,CAAC,GAAG,GAAlB;AACD;;AACD,SAAOA,CAAP;AACD,CAPM;;;;AASA,IAAMC,OAAO,GAAG,SAAVA,OAAU,CAACC,IAAD,EAAOC,IAAP,EAAgB;AACrC,MAAMC,GAAG,GAAG,4BAAYF,IAAZ,EAAkBC,IAAlB,CAAZ;AACA,SAAO,IAAIE,yBAAJ,CAAUD,GAAG,CAACE,CAAd,EAAiBF,GAAG,CAACG,CAArB,CAAP;AACD,CAHM;AAKP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AACO,IAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAACN,IAAD,EAAOJ,OAAP,EAAgBW,IAAhB,EAAsBC,EAAtB,EAA6B;AAC1D,MAAMC,MAAM,GAAG,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AAG,SAAdA,WAAc,CAACH,KAAD,EAAW;AAC7B,MAAIA,KAAK,IAAI,EAAb,EAAiB;AACf,WAAO;AAAEc,MAAAA,GAAG,EAAE,UAAP;AAAmBC,MAAAA,IAAI,EAAE;AAAzB,KAAP;AACD,GAFD,MAEO,IAAIf,KAAK,GAAG,EAAR,IAAcA,KAAK,IAAI,GAA3B,EAAgC;AACrC,WAAO;AAAEc,MAAAA,GAAG,EAAE,aAAP;AAAsBC,MAAAA,IAAI,EAAE;AAA5B,KAAP;AACD,GAFM,MAEA,IAAIf,KAAK,GAAG,GAAR,IAAeA,KAAK,IAAI,GAA5B,EAAiC;AACtC,WAAO;AAAEc,MAAAA,GAAG,EAAE,cAAP;AAAuBC,MAAAA,IAAI,EAAE;AAA7B,KAAP;AACD,GAFM,MAEA,IAAIf,KAAK,GAAG,GAAR,IAAeA,KAAK,GAAG,GAA3B,EAAgC;AACrC,WAAO;AAAEc,MAAAA,GAAG,EAAE,WAAP;AAAoBC,MAAAA,IAAI,EAAE;AAA1B,KAAP;AACD;AACF,CAVD","sourcesContent":["import { trigCalculator } from 'trigonometry-calculator';\nimport Point from '@mapbox/point-geometry';\nimport debug from 'debug';\nimport { parse as parseOrigin } from './transform-origin';\nconst log = debug('@pie-lib:tools:anchor-utils');\n\nexport const toDegrees = (radians) => radians * (180 / Math.PI);\nexport const toRadians = (degrees) => degrees * (Math.PI / 180);\n\nexport const normalizeAngle = (a) => {\n if (a > 360) {\n return a % 360;\n } else if (a < 0) {\n return 360 + (a % 360);\n }\n return a;\n};\n\nexport const toPoint = (rect, edge) => {\n const out = parseOrigin(rect, edge);\n return new Point(out.x, out.y);\n};\n\n/**\n * Get the distance between to anchor points in a rect.\n * @param {{width: number, height: number}} rect - the rect\n * @param {number} degrees - the degrees\n * @param {string} from - from anchor\n * @param {string} to - to anchor\n * @returns {Point} point - the distance as a Point\n */\nexport const distanceBetween = (rect, degrees, from, to) => {\n const center = new Point(rect.width / 2, rect.height / 2);\n const radians = toRadians(degrees);\n const fromCenter = center.rotateAround(radians, toPoint(rect, from));\n const toCenter = center.rotateAround(radians, toPoint(rect, to));\n const diff = fromCenter.sub(toCenter);\n return diff;\n};\n\n/**\n * For a corner string, a point and a rect, return a relative x,y from that point to a corner.\n * Note that the y value descends as it goes down (unlike for a screen's y value), so this is only really useful for math functions.\n * @example\n * ```\n * getXAndY('top-left', {width: 100, height: 100}, 10, 10) //=> {x:10, y: -90}\n * ```\n * @param {*} corner\n * @param {*} rect\n * @param {*} point\n */\nexport const getXAndY = (corner, rect, point) => {\n if (corner === 'top-left') {\n const x = point.x * -1;\n const y = point.y;\n return { x, y };\n } else if (corner === 'bottom-left') {\n const x = point.x * -1;\n const y = point.y - rect.height;\n return { x, y };\n } else if (corner === 'top-right') {\n const x = rect.width - point.x;\n const y = point.y;\n return { x, y };\n } else if (corner === 'bottom-right') {\n const x = rect.width - point.x;\n const y = point.y - rect.height;\n return { x, y };\n }\n};\n\nexport const arctangent = (x, y) => toDegrees(Math.atan2(x, y));\n\nexport const getAngleAndHypotenuse = (corner, rect, point) => {\n const { x, y } = getXAndY(corner, rect, point);\n const degrees = arctangent(x, y);\n const hypotenuse = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));\n return { x, y, degrees, hypotenuse };\n};\n\nconst getPosition = (side, rect, point, angle, calcAngle) => {\n if (angle === 0) {\n return side === 'left' ? point.x : point.y;\n }\n const points = anglePoints(angle);\n const key = points[side];\n\n const { degrees, hypotenuse } = getAngleAndHypotenuse(key, rect, point);\n\n const ra = calcAngle(degrees);\n\n if (ra === 0) {\n return hypotenuse;\n }\n\n const t = {\n angles: { 0: ra, 1: 90 },\n sides: { 1: hypotenuse },\n };\n const out = trigCalculator(t);\n return out.sides[2];\n};\n\nexport const getTop = (rect, point, angle) => {\n return getPosition('top', rect, point, angle, (degrees) => {\n return Math.abs(angle + degrees);\n });\n};\n\nexport const getLeft = (rect, point, angle) => {\n return getPosition('left', rect, point, angle, (degrees) => {\n return Math.abs(angle + degrees + 90);\n });\n};\n\n/**\n * Calculate the position of an anchor within a bounding rect, if the source rect has been rotated by an angle.\n * It does this by finding the appropriate corner of the src rect, that touches the bounding rect, calculates\n * the hypotenuse (h) of that anchor to that point. Then using that plus the rotation it calculates\n * the sides of the triangle and returns the length of the side that touches the bounding rect.\n * @param {{width: number, height: number}} rect - the rect which contains the point\n * @param {{x:number, y: number}} point - the point within the rect\n * @param {number} angle - the angle in degrees that the rect has rotated.\n * @returns {{left: number, top: number}} position\n */\nexport const getAnchor = (rect, point, angle) => {\n log('[getAnchor] rect: ', rect, 'point:', point, 'angle: ', angle);\n if (point.x > rect.width) {\n throw new Error(`x: ${point.x} cannot be greater than width: ${rect.width}`);\n }\n if (point.y > rect.height) {\n throw new Error(`y: ${point.y} cannot be greater than height: ${rect.height}`);\n }\n const a = normalizeAngle(angle);\n const top = getTop(rect, point, a);\n const left = getLeft(rect, point, a);\n\n log('[getAnchor] top: ', top, 'left: ', left);\n return { top, left };\n};\n\nconst anglePoints = (angle) => {\n if (angle <= 90) {\n return { top: 'top-left', left: 'bottom-left' };\n } else if (angle > 90 && angle <= 180) {\n return { top: 'bottom-left', left: 'bottom-right' };\n } else if (angle > 180 && angle <= 270) {\n return { top: 'bottom-right', left: 'top-right' };\n } else if (angle > 270 && angle < 360) {\n return { top: 'top-right', left: 'top-left' };\n }\n};\n"],"file":"anchor-utils.js"}
|
package/lib/anchor.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -11,8 +13,6 @@ var _styles = require("@material-ui/core/styles");
|
|
|
11
13
|
|
|
12
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
15
|
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
-
|
|
16
16
|
var Anchor = (0, _styles.withStyles)(function (theme) {
|
|
17
17
|
return {
|
|
18
18
|
anchor: {
|
|
@@ -32,7 +32,7 @@ var Anchor = (0, _styles.withStyles)(function (theme) {
|
|
|
32
32
|
})(function (_ref) {
|
|
33
33
|
var classes = _ref.classes,
|
|
34
34
|
className = _ref.className;
|
|
35
|
-
return _react["default"].createElement("div", {
|
|
35
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
36
36
|
className: (0, _classnames["default"])(classes.anchor, className)
|
|
37
37
|
});
|
|
38
38
|
});
|