Skip to content

Commit

Permalink
Fixed dynamic text demo
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickmarabeas committed Jan 17, 2016
1 parent d8fb7b0 commit b6c8a55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
11 changes: 2 additions & 9 deletions demo/js/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,8 @@
};
}])
.controller('MainController', ['$scope', function($scope) {
$scope.dyn = 'FitText';
$scope.isActivePreserveLineHeight = true;

$scope.togglePreserveLineHeight = function () {
if ( $scope.isActivePreserveLineHeight === true )
$scope.isActivePreserveLineHeight = false;
else
$scope.isActivePreserveLineHeight = true;
};
this.data = {};
this.data.dyn = 'FitText';
}]);

})(window, document, angular);
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@

<div class="page">

<header data-ng-controller="MainController" class="cf">
<input type="text" data-ng-model="dyn" autofocus />
<header data-ng-controller="MainController as mainCtrl" class="cf">
<input type="text" data-ng-model="mainCtrl.data.dyn" autofocus />
<h1>
<span class="line1" data-fittext data-fittext-min="100" data-fittext-max="310" data-ng-model="dyn">{{dyn}}</span>
<span class="line1" data-fittext data-fittext-min="100" data-fittext-max="310" data-ng-bind="mainCtrl.data.dyn"></span>
<span class="line2" data-fittext data-fittext-load-delay="500">
<span>rustled my jimmies</span>
<span class="right red">jimmies</span>
Expand Down

0 comments on commit b6c8a55

Please sign in to comment.