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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e972bbd922678dfc2e96398e28bf7c0ca244e43888bc725b3ded68ca31eba1bc
4
- data.tar.gz: 385681f6de17231ca6761d7a1432f005fd8b0a44fa1384e45e67864455004ac1
3
+ metadata.gz: d18db8c043fc4f94860e382889c2d130fc78d7d607643fe5454a7d0f5f9fc71c
4
+ data.tar.gz: c2bc9f9b12837e0df45d321949278433516a4716c7a458d1ef46597de546bd34
5
5
  SHA512:
6
- metadata.gz: e8b93b49eb4839c608d2d36b2b77b1b8e178b46a8af15d250a6d9aa6cae50dc35e900e42a7fb010bb4ed118d9a84b6f2b5604caceb3495ada627766b568bdc5f
7
- data.tar.gz: e3771b1aff459ea89efe73b6dd7b62a4b6d3e8e7630f406b683f7b0d4e7e4c927bdcf18d19682d806875add00a0b9bfe0443dbace28874eff8f9459e330002d7
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.235
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-02 00:00:00.000000000 Z
12
+ date: 2020-11-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sassc