From f52bc54ec30f95c050449b869ce74e7961b52479 Mon Sep 17 00:00:00 2001 From: vadim Date: Sun, 29 Nov 2015 02:34:07 -0500 Subject: [PATCH] merged canvas element check --- README.md | 2 +- canvas-text-wrapper.js | 2 +- canvas-text-wrapper.min.js | 4 ++-- package.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8394c91..c5ca567 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ canvas-text-wrapper ================= -##v0.6.2 +##v0.6.3 ## Syntax diff --git a/canvas-text-wrapper.js b/canvas-text-wrapper.js index 7f9f622..6d9a22a 100644 --- a/canvas-text-wrapper.js +++ b/canvas-text-wrapper.js @@ -1,6 +1,6 @@ /*! canvas-text-wrapper * https://github.com/namniak/canvas-text-wrapper - * Version: 0.6.0 + * Version: 0.6.3 * MIT License (http://www.opensource.org/licenses/mit-license.html) */ diff --git a/canvas-text-wrapper.min.js b/canvas-text-wrapper.min.js index e49f2dd..952150a 100644 --- a/canvas-text-wrapper.min.js +++ b/canvas-text-wrapper.min.js @@ -1,6 +1,6 @@ /*! canvas-text-wrapper * https://github.com/namniak/canvas-text-wrapper - * Version: 0.6.0 + * Version: 0.6.3 * MIT License (http://www.opensource.org/licenses/mit-license.html) */ -!function(a){function b(a,b,c){"use strict";function d(a){t||(t=q.sizeToFill?s.font.split(/\b\d+px\b/i):q.font.split(/\b\d+px\b/i)),s.font=t[0]+a+"px"+t[1]}function e(){isNaN(q.lineHeight)?-1!==q.lineHeight.toString().indexOf("px")?D=parseInt(q.lineHeight):-1!==q.lineHeight.toString().indexOf("%")&&(D=parseInt(q.lineHeight)/100*y):D=y*q.lineHeight}function f(){if(q.sizeToFill){var a=b.trim().split(/\s+/).length,c=0;do g(++c);while(x>z&&A.join(" ").split(/\s+/).length==a);g(--c)}else h();q.justifyLines&&"auto"===q.lineBreak&&k(),n(),l()}function g(a){d(a),D=a,h()}function h(){if(q.allowNewLine)for(var a=b.trim().split("\n"),c=0,d=0;cw){for(var h=0;s.measureText(b+f[h]).width<=w&&ha)&&(a=c,b=d);var e,f,g,h,i,j=" ";for(d=0;d=e))){A[d]=A[d].trim().split(/\s+/).join(j),f=s.measureText(j).width,g=(a-s.measureText(A[d]).width)/f,h=g/(e-1),i="";for(var k=0;h>k;k++)i+=j;A[d]=A[d].trim().split(j).join(i)}}function l(){for(var a=0;aE&&F.join(" ").split(/\s+/).length==a);g(--c)}else h();q.justifyLines&&"auto"===q.lineBreak&&k(),n(),l()}function g(a){d(a),I=a,h()}function h(){if(q.allowNewLine)for(var a=b.trim().split("\n"),c=0,d=0;cB){for(var h=0;s.measureText(b+f[h]).width<=B&&ha)&&(a=c,b=d);var e,f,g,h,i,j=" ";for(d=0;d=e))){F[d]=F[d].trim().split(/\s+/).join(j),f=s.measureText(j).width,g=(a-s.measureText(F[d]).width)/f,h=g/(e-1),i="";for(var k=0;h>k;k++)i+=j;F[d]=F[d].trim().split(j).join(i)}}function l(){for(var a=0;a