From 6ea7c8a89b5bf0e3e1c750f777ca09b893ca4738 Mon Sep 17 00:00:00 2001 From: Vadim Date: Tue, 29 Sep 2015 22:40:44 -0400 Subject: [PATCH] fixed 1st example --- js/CanvasTextWrapper.js | 8 +------- js/examples.js | 2 +- js/options.js | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/js/CanvasTextWrapper.js b/js/CanvasTextWrapper.js index 95a5423..f7b9283 100644 --- a/js/CanvasTextWrapper.js +++ b/js/CanvasTextWrapper.js @@ -1,10 +1,3 @@ -/*! CanvasTextWrapper - * https://github.com/namniak/CanvasTextWrapper - * Version: 0.4.0 - * MIT License (http://www.opensource.org/licenses/mit-license.html) - */ - - (function (root) { function CanvasTextWrapper(canvas, text, options) { @@ -73,6 +66,7 @@ setFont(--fontSize); lineHeight = fontSize; + wrap(); } else { wrap(); } diff --git a/js/examples.js b/js/examples.js index 673fac1..d29cc2d 100644 --- a/js/examples.js +++ b/js/examples.js @@ -22,7 +22,7 @@ document.onreadystatechange = function() { canvas.width = w; canvas.height = h; context = canvas.getContext('2d'); - context.lineWidth = 2; + context.lineWidth = 1; context.strokeStyle = 'yellow'; CanvasTextWrapper(canvas,(options[i].txt),options[i]); diff --git a/js/options.js b/js/options.js index 7705f26..2bc39d8 100644 --- a/js/options.js +++ b/js/options.js @@ -1,7 +1,7 @@ var model = [ { txt: 'Break text on every next word', - font: 'italic 800 36px Arial, sans-serif', + font: 'italic 800 25px Arial, sans-serif', textAlign: 'center', lineBreak: 'word', lineHeight: "160%"