From 749efdf2275c10f4300b508f89d3590cc8e7d8e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=20Ram=C3=ADrez?= Date: Mon, 4 Apr 2016 02:57:58 +0200 Subject: [PATCH] Adds fix for Title --- src/Preview.js | 10 +++++----- src/index.js | 4 ++-- src/objects/Title.js | 6 +++++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Preview.js b/src/Preview.js index 749e2bc..12bf09e 100644 --- a/src/Preview.js +++ b/src/Preview.js @@ -2,7 +2,7 @@ import React, {Component} from 'react'; import Radium from 'radium'; import SVGRenderer from './SVGRenderer'; -import {Text, Path, Rect, Circle} from './objects'; +import {Text, Path, Rect, Circle, Title} from './objects'; class Preview extends Component { static defaultProps = { @@ -29,9 +29,9 @@ class Preview extends Component { }; let canvas = { - width, - height, - canvasWidth: width, + width, + height, + canvasWidth: width, canvasHeight: height }; @@ -55,4 +55,4 @@ const styles = { } }; -export default Radium(Preview); \ No newline at end of file +export default Radium(Preview); diff --git a/src/index.js b/src/index.js index b2d2d3d..533a01b 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,4 @@ export Preview from './Preview'; -export {Vector, Path, Rect, Circle, Text} from './objects'; +import {Text, Path, Rect, Circle, Title} from './objects'; export {TextPanel, SizePanel, StylePanel, ArrangePanel} from './panels'; -export default from './Designer'; \ No newline at end of file +export default from './Designer'; diff --git a/src/objects/Title.js b/src/objects/Title.js index 9d39f97..711d078 100644 --- a/src/objects/Title.js +++ b/src/objects/Title.js @@ -1,7 +1,11 @@ import Text from './Text'; + +import React, {Component} from 'react'; +import {modes} from '../constants'; import Icon from '../Icon'; +import _ from 'lodash'; -export class Title extends Text { +export default class Title extends Text { static meta = { icon:
Title
, initial: {