fixed 1st example

This commit is contained in:
Vadim
2015-09-29 22:40:44 -04:00
parent c84729097f
commit 6ea7c8a89b
3 changed files with 3 additions and 9 deletions
+1 -7
View File
@@ -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();
}
+1 -1
View File
@@ -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]);
+1 -1
View File
@@ -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%"