829 top: ((gy + info.gh / 2) * g + info.fillTextOffsetY) + 'px',
830 width: info.fillTextWidth + 'px',
831 height: info.fillTextHeight + 'px',
832 lineHeight: fontSize + 'px', 833 whiteSpace: 'nowrap',
834 transform: transformRule,
835 webkitTransform: transformRule,
828 left: ((gx + info.gw / 2) * g + info.fillTextOffsetX) + 'px',
829 top: ((gy + info.gh / 2) * g + info.fillTextOffsetY) + 'px',
830 width: info.fillTextWidth + 'px',
831 height: info.fillTextHeight + 'px', 832 lineHeight: fontSize + 'px',
833 whiteSpace: 'nowrap',
834 transform: transformRule,
827 (fontSize * info.mu) + 'px ' + settings.fontFamily,
828 left: ((gx + info.gw / 2) * g + info.fillTextOffsetX) + 'px',
829 top: ((gy + info.gh / 2) * g + info.fillTextOffsetY) + 'px',
830 width: info.fillTextWidth + 'px', 831 height: info.fillTextHeight + 'px',
832 lineHeight: fontSize + 'px',
833 whiteSpace: 'nowrap',
826 font: fontWeight + ' ' +
827 (fontSize * info.mu) + 'px ' + settings.fontFamily,
828 left: ((gx + info.gw / 2) * g + info.fillTextOffsetX) + 'px',
829 top: ((gy + info.gh / 2) * g + info.fillTextOffsetY) + 'px', 830 width: info.fillTextWidth + 'px',
831 height: info.fillTextHeight + 'px',
832 lineHeight: fontSize + 'px',
825 display: 'block',
826 font: fontWeight + ' ' +
827 (fontSize * info.mu) + 'px ' + settings.fontFamily,
828 left: ((gx + info.gw / 2) * g + info.fillTextOffsetX) + 'px', 829 top: ((gy + info.gh / 2) * g + info.fillTextOffsetY) + 'px',
830 width: info.fillTextWidth + 'px',
831 height: info.fillTextHeight + 'px',
In ES2015 (ES6), we can use template literals instead of string concatenation.
var str = `Hello, ${name}!`;
var str = "Hello, " + name + "!";
var str = "Time: " + (12 * 60 * 60 * 1000);
var str = "Hello World!";
var str = `Hello, ${name}!`;
var str = `Time: ${12 * 60 * 60 * 1000}`;
var str = "Hello, " + "World!";