Allow setting text alignment, and default to centered text

master
Sven Slootweg 8 years ago
parent 273d0d11c1
commit be4743850a

@ -20,7 +20,8 @@ module.exports = function createPlaceholderRectangle(options = {}) {
text: createText({ text: createText({
fontSize: 14, fontSize: 14,
originX: "center", originX: "center",
originY: "center" originY: "center",
alignment: "center"
}) })
}, },
drawOrder: ["rectangle", "text"], drawOrder: ["rectangle", "text"],
@ -31,6 +32,7 @@ module.exports = function createPlaceholderRectangle(options = {}) {
textFillColor: "text.fillColor", textFillColor: "text.fillColor",
textStrokeColor: "text.strokeColor", textStrokeColor: "text.strokeColor",
textStrokeWidth: "text.strokeWidth", textStrokeWidth: "text.strokeWidth",
alignment: "text",
fontSize: "text", fontSize: "text",
fontFamily: "text", fontFamily: "text",
fontWeight: "text", fontWeight: "text",

Loading…
Cancel
Save