react-tag-cloud
Advanced tools
Comparing version 1.1.3 to 1.2.0
@@ -192,2 +192,3 @@ module.exports = | ||
y += height / 2; | ||
var transform = 'translate(' + x + 'px,' + y + 'px) rotate(' + item.rotate + 'deg)'; | ||
var style = _extends({ | ||
@@ -200,7 +201,11 @@ position: 'absolute' | ||
fontStyle: item.style, | ||
transform: 'translate(' + x + 'px,' + y + 'px) rotate(' + item.rotate + 'deg)', | ||
width: item.width, | ||
textAlign: 'center', | ||
whiteSpace: 'nowrap', | ||
transformOrigin: 'center bottom' | ||
transformOrigin: 'center bottom', | ||
WebkitTransform: transform, | ||
MozTransform: transform, | ||
MsTransform: transform, | ||
OTransform: transform, | ||
transform: transform | ||
}); | ||
@@ -207,0 +212,0 @@ if (!style.color && _this3.props.style.color && typeof _this3.props.style.color === 'function') { |
{ | ||
"name": "react-tag-cloud", | ||
"version": "1.1.3", | ||
"version": "1.2.0", | ||
"description": "Create beautiful tag/word clouds using React", | ||
@@ -27,4 +27,4 @@ "keywords": [ | ||
"dependencies": { | ||
"d3-cloud": "^1.2.4", | ||
"react-measure": "^2.0.2" | ||
"d3-cloud": "^1.2.5", | ||
"react-measure": "^2.1.2" | ||
}, | ||
@@ -31,0 +31,0 @@ "peerDependencies": { |
@@ -133,2 +133,3 @@ import React, { Component } from 'react'; | ||
y += (height / 2); | ||
const transform = `translate(${x}px,${y}px) rotate(${item.rotate}deg)`; | ||
const style = { | ||
@@ -141,8 +142,12 @@ position: 'absolute', | ||
fontStyle: item.style, | ||
transform: `translate(${x}px,${y}px) rotate(${item.rotate}deg)`, | ||
width: item.width, | ||
textAlign: 'center', | ||
whiteSpace: 'nowrap', | ||
transformOrigin: 'center bottom' | ||
}; | ||
transformOrigin: 'center bottom', | ||
WebkitTransform: transform, | ||
MozTransform: transform, | ||
MsTransform: transform, | ||
OTransform: transform, | ||
transform: transform, | ||
}; | ||
if (!style.color && this.props.style.color && (typeof this.props.style.color === 'function')) { | ||
@@ -149,0 +154,0 @@ style.color = this.props.style.color(item.child, index); |
23245
537
Updatedd3-cloud@^1.2.5
Updatedreact-measure@^2.1.2