diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-10-06 18:13:58 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-10-06 18:19:58 -0400 |
| commit | 4d78b32ce840bb804221f0208ee7cb0c8ffa8e02 (patch) | |
| tree | 7578a24d6cecca4f1d316332de64b46a976ceaac /public/assets/javascripts/ui/editor/TextEditor.js | |
| parent | 1dae6e5dfce901cdadeebd2e191927dbc5a326f6 (diff) | |
setting font family & size
Diffstat (limited to 'public/assets/javascripts/ui/editor/TextEditor.js')
| -rw-r--r-- | public/assets/javascripts/ui/editor/TextEditor.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/public/assets/javascripts/ui/editor/TextEditor.js b/public/assets/javascripts/ui/editor/TextEditor.js index 3d3124b..c867d94 100644 --- a/public/assets/javascripts/ui/editor/TextEditor.js +++ b/public/assets/javascripts/ui/editor/TextEditor.js @@ -30,7 +30,15 @@ var TextEditor = FormView.extend({ this.$el.toggleClass("active", state) if (state) { - Scenery.nextMedia = { type: 'text', width: 300, height: 150 } + Scenery.nextMedia = { + type: 'text', + width: 600, + height: 450, + scale: 0.5, + font: { family: 'Lato', size: 12 }, + align: 'left', + } + this.createMode(true) } }, @@ -101,9 +109,12 @@ var TextEditor = FormView.extend({ }, changeFontFamily: function(){ + this.scenery.setFont({ family: this.$fontFamily.val() }) }, changeFontSize: function(){ + var size = parseInt( this.$fontSize.val() ) + size && this.scenery.setFont({ size: size }) }, changeText: function(e){ |
