|
|
@ -108,10 +108,12 @@ class Editor extends React.Component {
|
|
|
|
const width = node.offsetWidth * exportSize
|
|
|
|
const width = node.offsetWidth * exportSize
|
|
|
|
const height = squared ? node.offsetWidth * exportSize : node.offsetHeight * exportSize
|
|
|
|
const height = squared ? node.offsetWidth * exportSize : node.offsetHeight * exportSize
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const transformOrigin = window.navigator.userAgent.indexOf('Safari') !== -1 ? '0 50%' : 'center'
|
|
|
|
|
|
|
|
|
|
|
|
const config = {
|
|
|
|
const config = {
|
|
|
|
style: {
|
|
|
|
style: {
|
|
|
|
transform: `scale(${exportSize})`,
|
|
|
|
transform: `scale(${exportSize})`,
|
|
|
|
'transform-origin': 'center',
|
|
|
|
'transform-origin': transformOrigin,
|
|
|
|
background: squared ? this.state.backgroundColor : 'none',
|
|
|
|
background: squared ? this.state.backgroundColor : 'none',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
filter: n => {
|
|
|
|
filter: n => {
|
|
|
|