@pie-lib/plot 2.1.9 → 2.1.10-next.351

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 CHANGED
@@ -7,430 +7,228 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
7
7
 
8
8
  **Note:** Version bump only for package @pie-lib/plot
9
9
 
10
-
11
-
12
-
13
-
14
10
  ## [2.1.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.1.6...@pie-lib/plot@2.1.7) (2021-06-25)
15
11
 
16
12
  **Note:** Version bump only for package @pie-lib/plot
17
13
 
18
-
19
-
20
-
21
-
22
14
  ## [2.1.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.1.5...@pie-lib/plot@2.1.6) (2021-04-06)
23
15
 
24
16
  **Note:** Version bump only for package @pie-lib/plot
25
17
 
26
-
27
-
28
-
29
-
30
18
  ## [2.1.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.1.4...@pie-lib/plot@2.1.5) (2021-04-02)
31
19
 
32
-
33
20
  ### Bug Fixes
34
21
 
35
- * **graphing:** Modified labels size and bug fixes ([e6dd79a](https://github.com/pie-framework/pie-lib/commit/e6dd79a))
36
-
37
-
38
-
39
-
22
+ - **graphing:** Modified labels size and bug fixes ([e6dd79a](https://github.com/pie-framework/pie-lib/commit/e6dd79a))
40
23
 
41
24
  ## [2.1.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.1.3...@pie-lib/plot@2.1.4) (2021-03-15)
42
25
 
43
-
44
26
  ### Bug Fixes
45
27
 
46
- * **graphing:** calculate the amount of necessary width for domain axis label PD-988 ([0085feb](https://github.com/pie-framework/pie-lib/commit/0085feb))
47
- * **graphing:** increase width and height for labels, depending on labels length PD-988 ([5f64c47](https://github.com/pie-framework/pie-lib/commit/5f64c47))
48
- * **graphing:** increase width for range axisLabel PD-988 ([e4e5b8f](https://github.com/pie-framework/pie-lib/commit/e4e5b8f))
49
-
50
-
51
-
52
-
28
+ - **graphing:** calculate the amount of necessary width for domain axis label PD-988 ([0085feb](https://github.com/pie-framework/pie-lib/commit/0085feb))
29
+ - **graphing:** increase width and height for labels, depending on labels length PD-988 ([5f64c47](https://github.com/pie-framework/pie-lib/commit/5f64c47))
30
+ - **graphing:** increase width for range axisLabel PD-988 ([e4e5b8f](https://github.com/pie-framework/pie-lib/commit/e4e5b8f))
53
31
 
54
32
  ## [2.1.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.1.2...@pie-lib/plot@2.1.3) (2021-02-15)
55
33
 
56
34
  **Note:** Version bump only for package @pie-lib/plot
57
35
 
58
-
59
-
60
-
61
-
62
36
  ## [2.1.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.1.0...@pie-lib/plot@2.1.2) (2021-02-15)
63
37
 
64
38
  **Note:** Version bump only for package @pie-lib/plot
65
39
 
66
-
67
-
68
-
69
-
70
40
  # [2.1.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@2.0.0...@pie-lib/plot@2.1.0) (2020-10-07)
71
41
 
72
-
73
42
  ### Features
74
43
 
75
- * **charting:** add color theme support ([606d45e](https://github.com/pie-framework/pie-lib/commit/606d45e))
76
-
77
-
78
-
79
-
44
+ - **charting:** add color theme support ([606d45e](https://github.com/pie-framework/pie-lib/commit/606d45e))
80
45
 
81
46
  # [2.0.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.3.16...@pie-lib/plot@2.0.0) (2020-05-15)
82
47
 
83
-
84
48
  ### Bug Fixes
85
49
 
86
- * Graphing issues and inconsistencies PD-123 ([291b053](https://github.com/pie-framework/pie-lib/commit/291b053))
87
-
50
+ - Graphing issues and inconsistencies PD-123 ([291b053](https://github.com/pie-framework/pie-lib/commit/291b053))
88
51
 
89
52
  ### BREAKING CHANGES
90
53
 
91
- * tools, currentTool, defaultTool and hideLabel should not be used as params anymore, instead, send only toolbarTools, which is an array of strings, where each string should be a valid tool type. eg. ['point', 'line', 'label']
92
-
93
-
94
-
95
-
54
+ - tools, currentTool, defaultTool and hideLabel should not be used as params anymore, instead, send only toolbarTools, which is an array of strings, where each string should be a valid tool type. eg. ['point', 'line', 'label']
96
55
 
97
56
  ## [1.3.16](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.3.15...@pie-lib/plot@1.3.16) (2020-04-14)
98
57
 
99
58
  **Note:** Version bump only for package @pie-lib/plot
100
59
 
101
-
102
-
103
-
104
-
105
60
  ## [1.3.15](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.3.14...@pie-lib/plot@1.3.15) (2020-04-08)
106
61
 
107
62
  **Note:** Version bump only for package @pie-lib/plot
108
63
 
109
-
110
-
111
-
112
-
113
64
  ## [1.3.14](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.3.13...@pie-lib/plot@1.3.14) (2020-03-31)
114
65
 
115
66
  **Note:** Version bump only for package @pie-lib/plot
116
67
 
117
-
118
-
119
-
120
-
121
68
  ## [1.3.13](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.3.12...@pie-lib/plot@1.3.13) (2020-03-31)
122
69
 
123
70
  **Note:** Version bump only for package @pie-lib/plot
124
71
 
125
-
126
-
127
-
128
-
129
72
  ## [1.3.12](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.3.11...@pie-lib/plot@1.3.12) (2020-03-31)
130
73
 
131
74
  **Note:** Version bump only for package @pie-lib/plot
132
75
 
133
-
134
-
135
-
136
-
137
76
  ## [1.3.11](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.3.10...@pie-lib/plot@1.3.11) (2020-03-30)
138
77
 
139
78
  **Note:** Version bump only for package @pie-lib/plot
140
79
 
141
-
142
-
143
-
144
-
145
80
  ## [1.3.10](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.3.9...@pie-lib/plot@1.3.10) (2020-03-30)
146
81
 
147
82
  **Note:** Version bump only for package @pie-lib/plot
148
83
 
149
-
150
-
151
-
152
-
153
84
  ## [1.3.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.3.8...@pie-lib/plot@1.3.9) (2020-03-30)
154
85
 
155
86
  **Note:** Version bump only for package @pie-lib/plot
156
87
 
157
-
158
-
159
-
160
-
161
88
  ## [1.3.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.3.7...@pie-lib/plot@1.3.8) (2020-03-30)
162
89
 
163
90
  **Note:** Version bump only for package @pie-lib/plot
164
91
 
165
-
166
-
167
-
168
-
169
92
  ## [1.3.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.3.6...@pie-lib/plot@1.3.7) (2020-03-30)
170
93
 
171
-
172
94
  ### Bug Fixes
173
95
 
174
- * correct export syntax ([db7fcc0](https://github.com/pie-framework/pie-lib/commit/db7fcc0))
175
-
176
-
177
-
178
-
96
+ - correct export syntax ([db7fcc0](https://github.com/pie-framework/pie-lib/commit/db7fcc0))
179
97
 
180
98
  ## [1.3.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.3.5...@pie-lib/plot@1.3.6) (2020-03-30)
181
99
 
182
100
  **Note:** Version bump only for package @pie-lib/plot
183
101
 
184
-
185
-
186
-
187
-
188
102
  ## [1.3.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.3.4...@pie-lib/plot@1.3.5) (2020-03-30)
189
103
 
190
-
191
104
  ### Bug Fixes
192
105
 
193
- * add module prop to package.json ([387232f](https://github.com/pie-framework/pie-lib/commit/387232f))
194
-
195
-
196
-
197
-
106
+ - add module prop to package.json ([387232f](https://github.com/pie-framework/pie-lib/commit/387232f))
198
107
 
199
108
  ## [1.3.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.3.3...@pie-lib/plot@1.3.4) (2020-03-18)
200
109
 
201
110
  **Note:** Version bump only for package @pie-lib/plot
202
111
 
203
-
204
-
205
-
206
-
207
112
  ## [1.3.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.3.2...@pie-lib/plot@1.3.3) (2020-02-18)
208
113
 
209
-
210
114
  ### Bug Fixes
211
115
 
212
- * 5325: Graphing: Axis labels overlapping numeric labels ([678c61a](https://github.com/pie-framework/pie-lib/commit/678c61a))
213
-
214
-
215
-
216
-
116
+ - 5325: Graphing: Axis labels overlapping numeric labels ([678c61a](https://github.com/pie-framework/pie-lib/commit/678c61a))
217
117
 
218
118
  ## [1.3.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.3.1...@pie-lib/plot@1.3.2) (2020-02-11)
219
119
 
220
120
  **Note:** Version bump only for package @pie-lib/plot
221
121
 
222
-
223
-
224
-
225
-
226
122
  ## [1.3.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.3.0...@pie-lib/plot@1.3.1) (2019-08-21)
227
123
 
228
124
  **Note:** Version bump only for package @pie-lib/plot
229
125
 
230
-
231
-
232
-
233
-
234
126
  # [1.3.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.2.1...@pie-lib/plot@1.3.0) (2019-08-05)
235
127
 
236
-
237
128
  ### Features
238
129
 
239
- * **charting:** Added Dot Plot chart type and Line Plot chart type. (WIP) ([b9cafc3](https://github.com/pie-framework/pie-lib/commit/b9cafc3))
240
-
241
-
242
-
243
-
130
+ - **charting:** Added Dot Plot chart type and Line Plot chart type. (WIP) ([b9cafc3](https://github.com/pie-framework/pie-lib/commit/b9cafc3))
244
131
 
245
132
  ## [1.2.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.2.0...@pie-lib/plot@1.2.1) (2019-07-19)
246
133
 
247
134
  **Note:** Version bump only for package @pie-lib/plot
248
135
 
249
-
250
-
251
-
252
-
253
136
  # [1.2.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.1.4...@pie-lib/plot@1.2.0) (2019-07-16)
254
137
 
255
-
256
138
  ### Features
257
139
 
258
- * support dragging when having a grid defined by decimal values ([5a5e505](https://github.com/pie-framework/pie-lib/commit/5a5e505))
259
-
260
-
261
-
262
-
140
+ - support dragging when having a grid defined by decimal values ([5a5e505](https://github.com/pie-framework/pie-lib/commit/5a5e505))
263
141
 
264
142
  ## [1.1.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.1.3...@pie-lib/plot@1.1.4) (2019-07-08)
265
143
 
266
144
  **Note:** Version bump only for package @pie-lib/plot
267
145
 
268
-
269
-
270
-
271
-
272
146
  ## [1.1.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.1.2...@pie-lib/plot@1.1.3) (2019-07-05)
273
147
 
274
148
  **Note:** Version bump only for package @pie-lib/plot
275
149
 
276
-
277
-
278
-
279
-
280
150
  ## [1.1.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@1.1.1...@pie-lib/plot@1.1.2) (2019-07-02)
281
151
 
282
152
  **Note:** Version bump only for package @pie-lib/plot
283
153
 
284
-
285
-
286
-
287
-
288
154
  ## [1.1.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@0.2.2...@pie-lib/plot@1.1.1) (2019-06-28)
289
155
 
290
-
291
156
  ### Bug Fixes
292
157
 
293
- * fix version conflict ([397b5de](https://github.com/pie-framework/pie-lib/commit/397b5de))
294
-
295
-
296
-
297
-
158
+ - fix version conflict ([397b5de](https://github.com/pie-framework/pie-lib/commit/397b5de))
298
159
 
299
160
  ## [0.2.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@0.2.1...@pie-lib/plot@0.2.2) (2019-06-28)
300
161
 
301
-
302
162
  ### Bug Fixes
303
163
 
304
- * calculate edge when points are on same horizontal or vertical line ([5cba298](https://github.com/pie-framework/pie-lib/commit/5cba298))
305
-
306
-
307
-
308
-
164
+ - calculate edge when points are on same horizontal or vertical line ([5cba298](https://github.com/pie-framework/pie-lib/commit/5cba298))
309
165
 
310
166
  ## [0.2.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@0.2.0...@pie-lib/plot@0.2.1) (2019-06-17)
311
167
 
312
168
  **Note:** Version bump only for package @pie-lib/plot
313
169
 
314
-
315
-
316
-
317
-
318
170
  # [0.2.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@0.1.12...@pie-lib/plot@0.2.0) (2019-06-12)
319
171
 
320
-
321
172
  ### Bug Fixes
322
173
 
323
- * fix bounded drag calculation ([08097bd](https://github.com/pie-framework/pie-lib/commit/08097bd))
324
-
174
+ - fix bounded drag calculation ([08097bd](https://github.com/pie-framework/pie-lib/commit/08097bd))
325
175
 
326
176
  ### Features
327
177
 
328
- * plot updates ([6856d56](https://github.com/pie-framework/pie-lib/commit/6856d56))
329
-
330
-
331
-
332
-
178
+ - plot updates ([6856d56](https://github.com/pie-framework/pie-lib/commit/6856d56))
333
179
 
334
180
  ## [0.1.12](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@0.1.11...@pie-lib/plot@0.1.12) (2019-03-15)
335
181
 
336
-
337
182
  ### Bug Fixes
338
183
 
339
- * rm child prepack in favour of root prepack ([381d8d6](https://github.com/pie-framework/pie-lib/commit/381d8d6))
340
-
341
-
342
-
343
-
184
+ - rm child prepack in favour of root prepack ([381d8d6](https://github.com/pie-framework/pie-lib/commit/381d8d6))
344
185
 
345
186
  ## [0.1.11](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@0.1.10...@pie-lib/plot@0.1.11) (2019-03-14)
346
187
 
347
188
  **Note:** Version bump only for package @pie-lib/plot
348
189
 
349
-
350
-
351
-
352
-
353
190
  ## [0.1.10](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@0.1.9...@pie-lib/plot@0.1.10) (2019-03-14)
354
191
 
355
192
  **Note:** Version bump only for package @pie-lib/plot
356
193
 
357
-
358
-
359
-
360
-
361
194
  ## [0.1.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@0.1.8...@pie-lib/plot@0.1.9) (2019-03-14)
362
195
 
363
196
  **Note:** Version bump only for package @pie-lib/plot
364
197
 
365
-
366
-
367
-
368
-
369
198
  ## [0.1.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@0.1.7...@pie-lib/plot@0.1.8) (2019-03-14)
370
199
 
371
200
  **Note:** Version bump only for package @pie-lib/plot
372
201
 
373
-
374
-
375
-
376
-
377
202
  ## [0.1.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@0.1.6...@pie-lib/plot@0.1.7) (2019-03-13)
378
203
 
379
204
  **Note:** Version bump only for package @pie-lib/plot
380
205
 
381
-
382
-
383
-
384
-
385
206
  ## [0.1.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@0.1.5...@pie-lib/plot@0.1.6) (2019-03-13)
386
207
 
387
208
  **Note:** Version bump only for package @pie-lib/plot
388
209
 
389
-
390
-
391
-
392
-
393
210
  ## [0.1.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@0.1.4...@pie-lib/plot@0.1.5) (2019-03-13)
394
211
 
395
212
  **Note:** Version bump only for package @pie-lib/plot
396
213
 
397
-
398
-
399
-
400
-
401
214
  ## [0.1.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@0.1.2...@pie-lib/plot@0.1.4) (2019-02-17)
402
215
 
403
-
404
216
  ### Bug Fixes
405
217
 
406
- * force version bump ([dd057a5](https://github.com/pie-framework/pie-lib/commit/dd057a5))
407
-
408
-
409
-
410
-
218
+ - force version bump ([dd057a5](https://github.com/pie-framework/pie-lib/commit/dd057a5))
411
219
 
412
220
  ## [0.1.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@0.1.1...@pie-lib/plot@0.1.2) (2019-02-17)
413
221
 
414
-
415
222
  ### Bug Fixes
416
223
 
417
- * fix tests ([1363aa4](https://github.com/pie-framework/pie-lib/commit/1363aa4))
418
-
419
-
420
-
421
-
224
+ - fix tests ([1363aa4](https://github.com/pie-framework/pie-lib/commit/1363aa4))
422
225
 
423
226
  ## [0.1.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@0.1.0...@pie-lib/plot@0.1.1) (2019-01-30)
424
227
 
425
228
  **Note:** Version bump only for package @pie-lib/plot
426
229
 
427
-
428
-
429
-
430
-
431
230
  # 0.1.0 (2019-01-30)
432
231
 
433
-
434
232
  ### Features
435
233
 
436
- * new package plot ([1adf654](https://github.com/pie-framework/pie-lib/commit/1adf654))
234
+ - new package plot ([1adf654](https://github.com/pie-framework/pie-lib/commit/1adf654))
package/lib/draggable.js CHANGED
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -13,39 +15,43 @@ exports["default"] = void 0;
13
15
 
14
16
  var _reactDraggable = _interopRequireWildcard(require("react-draggable"));
15
17
 
16
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } }
18
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
19
 
18
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
20
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
21
 
20
22
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
21
23
 
22
24
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
23
25
 
24
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
26
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
27
 
26
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
28
+ function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
27
29
 
28
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
30
+ function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
29
31
 
30
- function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
32
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
31
33
 
32
- function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
34
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
35
 
34
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
36
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
35
37
 
36
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
38
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
37
39
 
38
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
40
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
41
+
42
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
39
43
 
40
- var LocalDraggable =
41
- /*#__PURE__*/
42
- function (_Draggable) {
44
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
45
+
46
+ var LocalDraggable = /*#__PURE__*/function (_Draggable) {
43
47
  _inherits(LocalDraggable, _Draggable);
44
48
 
49
+ var _super = _createSuper(LocalDraggable);
50
+
45
51
  function LocalDraggable() {
46
52
  _classCallCheck(this, LocalDraggable);
47
53
 
48
- return _possibleConstructorReturn(this, _getPrototypeOf(LocalDraggable).apply(this, arguments));
54
+ return _super.apply(this, arguments);
49
55
  }
50
56
 
51
57
  _createClass(LocalDraggable, [{
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/draggable.jsx"],"names":["LocalDraggable","next","setState","x","y","Draggable"],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;IAEqBA,c;;;;;;;;;;;;;8CACOC,I,EAAM;AAC9B,oGAAgCA,IAAhC,EAD8B,CAE9B;;;AACA,WAAKC,QAAL,CAAc;AAAEC,QAAAA,CAAC,EAAE,CAAL;AAAQC,QAAAA,CAAC,EAAE;AAAX,OAAd;AACD;;;;EALyCC,0B","sourcesContent":["import Draggable, { DraggableCore } from 'react-draggable';\n\nexport default class LocalDraggable extends Draggable {\n componentWillReceiveProps(next) {\n super.componentWillReceiveProps(next);\n //Remove the x/y state as these values have now been updated and will come through as props.\n this.setState({ x: 0, y: 0 });\n }\n}\n\nexport { DraggableCore };\n"],"file":"draggable.js"}
1
+ {"version":3,"sources":["../src/draggable.jsx"],"names":["LocalDraggable","next","setState","x","y","Draggable"],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEqBA,c;;;;;;;;;;;;;WACnB,mCAA0BC,IAA1B,EAAgC;AAC9B,oGAAgCA,IAAhC,EAD8B,CAE9B;;;AACA,WAAKC,QAAL,CAAc;AAAEC,QAAAA,CAAC,EAAE,CAAL;AAAQC,QAAAA,CAAC,EAAE;AAAX,OAAd;AACD;;;;EALyCC,0B","sourcesContent":["import Draggable, { DraggableCore } from 'react-draggable';\n\nexport default class LocalDraggable extends Draggable {\n componentWillReceiveProps(next) {\n super.componentWillReceiveProps(next);\n //Remove the x/y state as these values have now been updated and will come through as props.\n this.setState({ x: 0, y: 0 });\n }\n}\n\nexport { DraggableCore };\n"],"file":"draggable.js"}
@@ -29,13 +29,11 @@ var createSnapMinAndMax = function createSnapMinAndMax(_ref) {
29
29
  var create = function create(domain, range, size, getRootNode) {
30
30
  (0, _invariant["default"])(domain.min < domain.max, 'domain: min must be less than max');
31
31
  (0, _invariant["default"])(range.min < range.max, 'range: min must be less than max');
32
- var widthArray = (0, _utils.buildSizeArray)(size.width, domain.padding);
33
- var heightArray = (0, _utils.buildSizeArray)(size.height, range.padding);
34
32
  var domainMinMax = createSnapMinAndMax(domain);
35
33
  var rangeMinMax = createSnapMinAndMax(range);
36
34
  var scale = {
37
- x: (0, _d3Scale.scaleLinear)().domain([domain.min, domain.max]).range(widthArray),
38
- y: (0, _d3Scale.scaleLinear)().domain([range.max, range.min]).range(heightArray)
35
+ x: (0, _d3Scale.scaleLinear)().domain([domain.min, domain.max]).range([0, size.width]),
36
+ y: (0, _d3Scale.scaleLinear)().domain([range.max, range.min]).range([0, size.height])
39
37
  };
40
38
  var snap = {
41
39
  x: _utils.snapTo.bind(null, domainMinMax.min, domainMinMax.max, domainMinMax.step),
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graph-props.js"],"names":["createSnapMinAndMax","min","max","step","parseInt","create","domain","range","size","getRootNode","widthArray","width","padding","heightArray","height","domainMinMax","rangeMinMax","scale","x","y","snap","snapTo","bind"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAEA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAsB,OAAwB;AAAA,MAArBC,GAAqB,QAArBA,GAAqB;AAAA,MAAhBC,GAAgB,QAAhBA,GAAgB;AAAA,MAAXC,IAAW,QAAXA,IAAW;AAClD;AACA;AACA,SAAO;AACLA,IAAAA,IAAI,EAAJA,IADK;AAELF,IAAAA,GAAG,EAAEG,QAAQ,CAACH,GAAG,GAAGE,IAAP,CAAR,GAAuBA,IAFvB;AAGLD,IAAAA,GAAG,EAAEE,QAAQ,CAACF,GAAG,GAAGC,IAAP,CAAR,GAAuBA;AAHvB,GAAP;AAKD,CARD;;AAUO,IAAME,MAAM,GAAG,SAATA,MAAS,CAACC,MAAD,EAASC,KAAT,EAAgBC,IAAhB,EAAsBC,WAAtB,EAAsC;AAC1D,6BAAUH,MAAM,CAACL,GAAP,GAAaK,MAAM,CAACJ,GAA9B,EAAmC,mCAAnC;AACA,6BAAUK,KAAK,CAACN,GAAN,GAAYM,KAAK,CAACL,GAA5B,EAAiC,kCAAjC;AAEA,MAAMQ,UAAU,GAAG,2BAAeF,IAAI,CAACG,KAApB,EAA2BL,MAAM,CAACM,OAAlC,CAAnB;AACA,MAAMC,WAAW,GAAG,2BAAeL,IAAI,CAACM,MAApB,EAA4BP,KAAK,CAACK,OAAlC,CAApB;AAEA,MAAMG,YAAY,GAAGf,mBAAmB,CAACM,MAAD,CAAxC;AACA,MAAMU,WAAW,GAAGhB,mBAAmB,CAACO,KAAD,CAAvC;AAEA,MAAMU,KAAK,GAAG;AACZC,IAAAA,CAAC,EAAE,4BACAZ,MADA,CACO,CAACA,MAAM,CAACL,GAAR,EAAaK,MAAM,CAACJ,GAApB,CADP,EAEAK,KAFA,CAEMG,UAFN,CADS;AAIZS,IAAAA,CAAC,EAAE,4BACAb,MADA,CACO,CAACC,KAAK,CAACL,GAAP,EAAYK,KAAK,CAACN,GAAlB,CADP,EAEAM,KAFA,CAEMM,WAFN;AAJS,GAAd;AASA,MAAMO,IAAI,GAAG;AACXF,IAAAA,CAAC,EAAEG,cAAOC,IAAP,CAAY,IAAZ,EAAkBP,YAAY,CAACd,GAA/B,EAAoCc,YAAY,CAACb,GAAjD,EAAsDa,YAAY,CAACZ,IAAnE,CADQ;AAEXgB,IAAAA,CAAC,EAAEE,cAAOC,IAAP,CAAY,IAAZ,EAAkBN,WAAW,CAACf,GAA9B,EAAmCe,WAAW,CAACd,GAA/C,EAAoDc,WAAW,CAACb,IAAhE;AAFQ,GAAb;AAKA,SAAO;AAAEc,IAAAA,KAAK,EAALA,KAAF;AAASG,IAAAA,IAAI,EAAJA,IAAT;AAAed,IAAAA,MAAM,EAANA,MAAf;AAAuBC,IAAAA,KAAK,EAALA,KAAvB;AAA8BC,IAAAA,IAAI,EAAJA,IAA9B;AAAoCC,IAAAA,WAAW,EAAXA;AAApC,GAAP;AACD,CAzBM","sourcesContent":["import invariant from 'invariant';\nimport { buildSizeArray, snapTo } from './utils';\nimport { scaleLinear } from 'd3-scale';\n\nconst createSnapMinAndMax = ({ min, max, step }) => {\n // for graphing, if step is a value with decimals, we have to calculate the min & max for the grid taking in consideration that 0 has to be exactly in the middle\n // for example, if min: -5 & max: 5 & step: 0.75, in order to keep 0 in the middle we have to set min: -4.5 & max: 4.5\n return {\n step,\n min: parseInt(min / step) * step,\n max: parseInt(max / step) * step\n };\n};\n\nexport const create = (domain, range, size, getRootNode) => {\n invariant(domain.min < domain.max, 'domain: min must be less than max');\n invariant(range.min < range.max, 'range: min must be less than max');\n\n const widthArray = buildSizeArray(size.width, domain.padding);\n const heightArray = buildSizeArray(size.height, range.padding);\n\n const domainMinMax = createSnapMinAndMax(domain);\n const rangeMinMax = createSnapMinAndMax(range);\n\n const scale = {\n x: scaleLinear()\n .domain([domain.min, domain.max])\n .range(widthArray),\n y: scaleLinear()\n .domain([range.max, range.min])\n .range(heightArray)\n };\n\n const snap = {\n x: snapTo.bind(null, domainMinMax.min, domainMinMax.max, domainMinMax.step),\n y: snapTo.bind(null, rangeMinMax.min, rangeMinMax.max, rangeMinMax.step)\n };\n\n return { scale, snap, domain, range, size, getRootNode };\n};\n"],"file":"graph-props.js"}
1
+ {"version":3,"sources":["../src/graph-props.js"],"names":["createSnapMinAndMax","min","max","step","parseInt","create","domain","range","size","getRootNode","domainMinMax","rangeMinMax","scale","x","width","y","height","snap","snapTo","bind"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAEA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAsB,OAAwB;AAAA,MAArBC,GAAqB,QAArBA,GAAqB;AAAA,MAAhBC,GAAgB,QAAhBA,GAAgB;AAAA,MAAXC,IAAW,QAAXA,IAAW;AAClD;AACA;AACA,SAAO;AACLA,IAAAA,IAAI,EAAJA,IADK;AAELF,IAAAA,GAAG,EAAEG,QAAQ,CAACH,GAAG,GAAGE,IAAP,CAAR,GAAuBA,IAFvB;AAGLD,IAAAA,GAAG,EAAEE,QAAQ,CAACF,GAAG,GAAGC,IAAP,CAAR,GAAuBA;AAHvB,GAAP;AAKD,CARD;;AAUO,IAAME,MAAM,GAAG,SAATA,MAAS,CAACC,MAAD,EAASC,KAAT,EAAgBC,IAAhB,EAAsBC,WAAtB,EAAsC;AAC1D,6BAAUH,MAAM,CAACL,GAAP,GAAaK,MAAM,CAACJ,GAA9B,EAAmC,mCAAnC;AACA,6BAAUK,KAAK,CAACN,GAAN,GAAYM,KAAK,CAACL,GAA5B,EAAiC,kCAAjC;AAEA,MAAMQ,YAAY,GAAGV,mBAAmB,CAACM,MAAD,CAAxC;AACA,MAAMK,WAAW,GAAGX,mBAAmB,CAACO,KAAD,CAAvC;AAEA,MAAMK,KAAK,GAAG;AACZC,IAAAA,CAAC,EAAE,4BACAP,MADA,CACO,CAACA,MAAM,CAACL,GAAR,EAAaK,MAAM,CAACJ,GAApB,CADP,EAEAK,KAFA,CAEM,CAAC,CAAD,EAAIC,IAAI,CAACM,KAAT,CAFN,CADS;AAIZC,IAAAA,CAAC,EAAE,4BACAT,MADA,CACO,CAACC,KAAK,CAACL,GAAP,EAAYK,KAAK,CAACN,GAAlB,CADP,EAEAM,KAFA,CAEM,CAAC,CAAD,EAAIC,IAAI,CAACQ,MAAT,CAFN;AAJS,GAAd;AASA,MAAMC,IAAI,GAAG;AACXJ,IAAAA,CAAC,EAAEK,cAAOC,IAAP,CAAY,IAAZ,EAAkBT,YAAY,CAACT,GAA/B,EAAoCS,YAAY,CAACR,GAAjD,EAAsDQ,YAAY,CAACP,IAAnE,CADQ;AAEXY,IAAAA,CAAC,EAAEG,cAAOC,IAAP,CAAY,IAAZ,EAAkBR,WAAW,CAACV,GAA9B,EAAmCU,WAAW,CAACT,GAA/C,EAAoDS,WAAW,CAACR,IAAhE;AAFQ,GAAb;AAKA,SAAO;AAAES,IAAAA,KAAK,EAALA,KAAF;AAASK,IAAAA,IAAI,EAAJA,IAAT;AAAeX,IAAAA,MAAM,EAANA,MAAf;AAAuBC,IAAAA,KAAK,EAALA,KAAvB;AAA8BC,IAAAA,IAAI,EAAJA,IAA9B;AAAoCC,IAAAA,WAAW,EAAXA;AAApC,GAAP;AACD,CAtBM","sourcesContent":["import invariant from 'invariant';\nimport { snapTo } from './utils';\nimport { scaleLinear } from 'd3-scale';\n\nconst createSnapMinAndMax = ({ min, max, step }) => {\n // for graphing, if step is a value with decimals, we have to calculate the min & max for the grid taking in consideration that 0 has to be exactly in the middle\n // for example, if min: -5 & max: 5 & step: 0.75, in order to keep 0 in the middle we have to set min: -4.5 & max: 4.5\n return {\n step,\n min: parseInt(min / step) * step,\n max: parseInt(max / step) * step\n };\n};\n\nexport const create = (domain, range, size, getRootNode) => {\n invariant(domain.min < domain.max, 'domain: min must be less than max');\n invariant(range.min < range.max, 'range: min must be less than max');\n\n const domainMinMax = createSnapMinAndMax(domain);\n const rangeMinMax = createSnapMinAndMax(range);\n\n const scale = {\n x: scaleLinear()\n .domain([domain.min, domain.max])\n .range([0, size.width]),\n y: scaleLinear()\n .domain([range.max, range.min])\n .range([0, size.height])\n };\n\n const snap = {\n x: snapTo.bind(null, domainMinMax.min, domainMinMax.max, domainMinMax.step),\n y: snapTo.bind(null, rangeMinMax.min, rangeMinMax.max, rangeMinMax.step)\n };\n\n return { scale, snap, domain, range, size, getRootNode };\n};\n"],"file":"graph-props.js"}