Skip to content

Commit

Permalink
fix(window): use global.window instead of window for node env
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Benitte committed Sep 11, 2017
1 parent 604eefb commit bf1e620
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/components/charts/bar/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ export const BarDefaultProps = {
padding: 0.1,
innerPadding: 0,

borderRadius: 0,

// axes & grid
axisBottom: {},
axisLeft: {},
Expand All @@ -110,6 +108,7 @@ export const BarDefaultProps = {

defs: [],
fill: [],
borderRadius: 0,
borderWidth: 0,
borderColor: 'inherit',

Expand All @@ -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,
}
3 changes: 2 additions & 1 deletion src/components/charts/bubble/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
3 changes: 2 additions & 1 deletion src/components/charts/chord/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
3 changes: 2 additions & 1 deletion src/components/charts/heatmap/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

0 comments on commit bf1e620

Please sign in to comment.