beyond-rails 0.0.235 → 0.0.236
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/src/js/components/BarChart.js +3 -0
- data/src/js/components/LineChart.js +2 -0
- data/src/js/decorators/chartCommon.js +7 -0
- 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: d18db8c043fc4f94860e382889c2d130fc78d7d607643fe5454a7d0f5f9fc71c
|
4
|
+
data.tar.gz: c2bc9f9b12837e0df45d321949278433516a4716c7a458d1ef46597de546bd34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35c60a7cbc639d1df874dee90d9d55d90f1b91e7691aeb2e5a39dff63cda835a382df3bab86ae817415aad0198d3c6674b6753fea97d1a8f6f818317a95482df
|
7
|
+
data.tar.gz: 8b040af8e540ced1356f09b8e8a5e35782ee989eb1aa029a25733bbe4a38ea1bb9b6592f194ab8477836d39e0c66bb1d0c3ab28190437d7ba636abd191bc6ce0
|
@@ -342,8 +342,11 @@ export default class BarChart {
|
|
342
342
|
refresh() {
|
343
343
|
this.raf(() => {
|
344
344
|
this.clearBarPos()
|
345
|
+
this.clearCanvasSize(this.canvas)
|
346
|
+
this.layers.forEach(layer => this.clearCanvasSize(layer.canvas))
|
345
347
|
this.setDomSizeIfNeeded()
|
346
348
|
this.setCanvasSize(this.canvas)
|
349
|
+
this.layers.forEach(layer => this.setCanvasSize(layer.canvas))
|
347
350
|
this.setLabelWidths()
|
348
351
|
this.setLabelHeights()
|
349
352
|
this.setAxisData()
|
@@ -466,6 +466,8 @@ export default class LineChart {
|
|
466
466
|
refresh() {
|
467
467
|
this.raf(() => {
|
468
468
|
this.clearPointPos()
|
469
|
+
this.clearCanvasSize(this.canvas)
|
470
|
+
this.layers.forEach(layer => this.clearCanvasSize(layer.canvas))
|
469
471
|
this.setDomSizeIfNeeded()
|
470
472
|
this.setCanvasSize(this.canvas)
|
471
473
|
this.layers.forEach(layer => this.setCanvasSize(layer.canvas))
|
@@ -203,6 +203,13 @@ export default function chartCommon(target) {
|
|
203
203
|
canvas.getContext('2d').scale(dpr, dpr)
|
204
204
|
}
|
205
205
|
|
206
|
+
clearCanvasSize(canvas) {
|
207
|
+
canvas.width = 0
|
208
|
+
canvas.height = 0
|
209
|
+
canvas.style.width = 0
|
210
|
+
canvas.style.height = 0
|
211
|
+
}
|
212
|
+
|
206
213
|
setDomSizeIfNeeded() {
|
207
214
|
if (isUndef(this.options.width)) {
|
208
215
|
this.width = this.dom.offsetWidth
|
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.236
|
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-11-
|
12
|
+
date: 2020-11-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sassc
|