From bf1e6202d7c80310dccf2f8958cb7f8b02ab1c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Benitte?= Date: Tue, 12 Sep 2017 01:24:22 +0900 Subject: [PATCH] fix(window): use global.window instead of window for node env --- src/components/charts/bar/props.js | 6 +++--- src/components/charts/bubble/props.js | 3 ++- src/components/charts/chord/props.js | 3 ++- src/components/charts/heatmap/props.js | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/charts/bar/props.js b/src/components/charts/bar/props.js index 14f93d1da..56e951e65 100644 --- a/src/components/charts/bar/props.js +++ b/src/components/charts/bar/props.js @@ -89,8 +89,6 @@ export const BarDefaultProps = { padding: 0.1, innerPadding: 0, - borderRadius: 0, - // axes & grid axisBottom: {}, axisLeft: {}, @@ -110,6 +108,7 @@ export const BarDefaultProps = { defs: [], fill: [], + borderRadius: 0, borderWidth: 0, borderColor: 'inherit', @@ -118,5 +117,6 @@ export const BarDefaultProps = { onClick: noop, // canvas specific - pixelRatio: window && window.devicePixelRatio ? window.devicePixelRatio : 1, + pixelRatio: + global.window && global.window.devicePixelRatio ? global.window.devicePixelRatio : 1, } diff --git a/src/components/charts/bubble/props.js b/src/components/charts/bubble/props.js index 6e833963d..3c578140f 100644 --- a/src/components/charts/bubble/props.js +++ b/src/components/charts/bubble/props.js @@ -81,5 +81,6 @@ export const bubbleDefaultProps = { isZoomable: true, // canvas specific - pixelRatio: window && window.devicePixelRatio ? window.devicePixelRatio : 1, + pixelRatio: + global.window && global.window.devicePixelRatio ? global.window.devicePixelRatio : 1, } diff --git a/src/components/charts/chord/props.js b/src/components/charts/chord/props.js index dbd70f318..3a204e801 100644 --- a/src/components/charts/chord/props.js +++ b/src/components/charts/chord/props.js @@ -84,5 +84,6 @@ export const ChordDefaultProps = { ribbonHoverOthersOpacity: 0.15, // canvas specific - pixelRatio: window && window.devicePixelRatio ? window.devicePixelRatio : 1, + pixelRatio: + global.window && global.window.devicePixelRatio ? global.window.devicePixelRatio : 1, } diff --git a/src/components/charts/heatmap/props.js b/src/components/charts/heatmap/props.js index 32220c3d3..4a47247b6 100644 --- a/src/components/charts/heatmap/props.js +++ b/src/components/charts/heatmap/props.js @@ -94,5 +94,6 @@ export const HeatMapDefaultProps = { cellHoverOthersOpacity: 0.35, // canvas specific - pixelRatio: window && window.devicePixelRatio ? window.devicePixelRatio : 1, + pixelRatio: + global.window && global.window.devicePixelRatio ? global.window.devicePixelRatio : 1, }