beyond-rails 0.0.196 → 0.0.197
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.
- checksums.yaml +4 -4
- data/src/js/components/BarChart.js +3 -3
- data/src/js/components/LineChart.js +3 -3
- data/src/js/decorators/chartCommon.js +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9032014c8dc22090470a9bf2ee4c3b6f861b530f6b20538896f266f3d8ca67bc
|
4
|
+
data.tar.gz: 6dc03f407892516d8be8bbdb31c43489f925525bac7ac44c890f5b2fec2f3f69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86f51a12a50544e2d4b6a078b4bd54298f0da1072bad2bba792a77e44222c358dbe76716a56242b34eaa350df6cd138ada2c3455a67e6e848f3be27fe7e4f96d
|
7
|
+
data.tar.gz: 3199bbbdd249ae0589a52dcfbf11eeaf186b25cf56fb5e42f1f55719a28cdbfccc05edc4dadb606a88cb7ac515e3a06035b107f6b66b28893f6c35f823d1afeb
|
@@ -20,7 +20,7 @@ export default class BarChart {
|
|
20
20
|
this.options = options
|
21
21
|
this.bars = []
|
22
22
|
|
23
|
-
this.height = options.height
|
23
|
+
this.height = options.height
|
24
24
|
this.width = options.width
|
25
25
|
|
26
26
|
this.toYLabel = isDef(options.toYLabel) ? mem(options.toYLabel) : (v => v)
|
@@ -46,7 +46,7 @@ export default class BarChart {
|
|
46
46
|
|
47
47
|
init() {
|
48
48
|
this.setDpr()
|
49
|
-
this.
|
49
|
+
this.setDomSizeIfNeeded()
|
50
50
|
this.setCanvas()
|
51
51
|
this.clear()
|
52
52
|
this.bindMedia()
|
@@ -342,7 +342,7 @@ export default class BarChart {
|
|
342
342
|
refresh() {
|
343
343
|
this.raf(() => {
|
344
344
|
this.clearBarPos()
|
345
|
-
this.
|
345
|
+
this.setDomSizeIfNeeded()
|
346
346
|
this.setCanvasSize(this.canvas)
|
347
347
|
this.setLabelWidths()
|
348
348
|
this.setLabelHeights()
|
@@ -41,7 +41,7 @@ export default class LineChart {
|
|
41
41
|
this.dom = dom
|
42
42
|
this.options = options
|
43
43
|
this.pointsArr = []
|
44
|
-
this.height = options.height
|
44
|
+
this.height = options.height
|
45
45
|
this.width = options.width
|
46
46
|
|
47
47
|
this.toXLabel = isDef(options.toXLabel) ? mem(options.toXLabel) : (v => v)
|
@@ -76,7 +76,7 @@ export default class LineChart {
|
|
76
76
|
|
77
77
|
init() {
|
78
78
|
this.setDpr()
|
79
|
-
this.
|
79
|
+
this.setDomSizeIfNeeded()
|
80
80
|
this.setCanvas()
|
81
81
|
this.clear()
|
82
82
|
this.bindMedia()
|
@@ -438,7 +438,7 @@ export default class LineChart {
|
|
438
438
|
refresh() {
|
439
439
|
this.raf(() => {
|
440
440
|
this.clearPointPos()
|
441
|
-
this.
|
441
|
+
this.setDomSizeIfNeeded()
|
442
442
|
this.setCanvasSize(this.canvas)
|
443
443
|
this.layers.forEach(layer => this.setCanvasSize(layer.canvas))
|
444
444
|
this.setLabelWidths()
|
@@ -205,10 +205,13 @@ export default function chartCommon(target) {
|
|
205
205
|
canvas.getContext('2d').scale(dpr, dpr)
|
206
206
|
}
|
207
207
|
|
208
|
-
|
208
|
+
setDomSizeIfNeeded() {
|
209
209
|
if (isUndef(this.options.width)) {
|
210
210
|
this.width = this.dom.offsetWidth
|
211
211
|
}
|
212
|
+
if (isUndef(this.options.height)) {
|
213
|
+
this.height = this.dom.offsetHeight
|
214
|
+
}
|
212
215
|
}
|
213
216
|
|
214
217
|
setDpr() {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beyond-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.197
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kmsheng
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-09-
|
12
|
+
date: 2020-09-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sassc
|