Skip to content

Commit

Permalink
Integrate #53 fix for parent padding
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickmarabeas committed Mar 3, 2017
1 parent b430db6 commit f3454b0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngFitText",
"version": "4.2.2",
"version": "4.2.3",
"main": [
"dist/ng-FitText.min.js"
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-fittext",
"version": "4.2.2",
"version": "4.2.3",
"description": "An AngularJS directive for inflating web type",
"homepage": "https://github.com/patrickmarabeas/ng-FitText.js",
"bugs": "https://github.com/patrickmarabeas/ng-FitText.js/issues",
Expand Down
4 changes: 2 additions & 2 deletions src/ng-FitText.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* ng-FitText.js v4.2.2
* ng-FitText.js v4.2.3
* https://github.com/patrickmarabeas/ng-FitText.js
*
* Original jQuery project: https://github.com/davatron5000/FitText.js
Expand Down Expand Up @@ -58,7 +58,7 @@
function calculate() {
var ratio = (calcSize * newlines) / domElem.offsetWidth / newlines;
return Math.max(
Math.min((parent[0].offsetWidth - 6) * ratio * compressor,
Math.min(((parent[0].offsetWidth - (parseFloat(getComputedStyle(parent[0]).paddingLeft) + parseFloat(getComputedStyle(parent[0]).paddingRight))) - 6) * ratio * compressor,
parseFloat(maxFontSize)
),
parseFloat(minFontSize)
Expand Down

0 comments on commit f3454b0

Please sign in to comment.