Comments (9)
Is it possible to "refresh" the action of ng-fitText please ?
from ng-fittext.js.
Could you create a demo (jsfiddle etc) to demonstrate the requirement / issue?
from ng-fittext.js.
yes here it is: http://codepen.io/LouisDoe/pen/rxGQpZ
from ng-fittext.js.
http://codepen.io/anon/pen/wMrQRq
- Need to include the module
- Model needed to be defined outside of the
showPopup
method - Max size was set to 17px - wayyyy too low ; )
- Need to use
data-ng-model="data.proModel"
attribute for dynamic text. This is a bug, though - as bothng-model
and{{}}
binding shouldn't be required for dynamic text to work properly
Have a look at the demo page in the repo for more examples.
from ng-fittext.js.
I see I spudded out when I added the dynamic stuff. ngModel
instead of ngBind
. Duhh.
from ng-fittext.js.
Thanks a lot @patrickmarabeas, so the solution to my problem was to add data-ng-model="" to my element so it can dynamically resize.
from ng-fittext.js.
@patrickmarabeas how should I do if there are several variable like this:
<div class="fittedRes" data-fittext data-fittext-max="12">
{{computed.userLengthFtin}} x {{computed.userWidthFtin}} x {{computed.userThickFtin}}
</div>
from ng-fittext.js.
Exactly the same. data-ng-model="computed.userLengthFtin + ' x ' + ... "
from ng-fittext.js.
ok perfect, thanks Patrick !
from ng-fittext.js.
Related Issues (20)
- Improved handling of custom fonts
- Cache element var
- Force refreshing HOT 7
- The behavior of Jade may prevent this module to work out of the box HOT 4
- The behavior of Jade can make complicated integration HOT 1
- Provide new version on npm HOT 3
- Cropping on last character HOT 1
- Resizing of dynamic text - does not work when data changes constantly HOT 4
- Parent padding should be excluded HOT 3
- Not working on page load. Only when resizing page. HOT 1
- Adding negative pixel letter-spacing causes fitText not to work as expected HOT 1
- Method to reset FitText HOT 1
- Provide source in bower HOT 2
- Solution for ng2 (Angular2)? HOT 3
- Line height issue HOT 6
- FitText makes the $digest cycle repeat a lot of times, and transition time becomes really long HOT 5
- Disable line-height HOT 2
- Line height calculating incorrectly
- Update minified js
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng-fittext.js.