Comments (13)
It's something I've been tossing up. Cheers for raising the issue.
from ng-fittext.js.
Cheers for considering! What's the downside, just having to implement debounce? Looks like lodash's is ~100 lines, but we could implement it less generically in fewer.
from ng-fittext.js.
Yeah, it was just a matter of including it as succinctly as possible...
from ng-fittext.js.
Added a minified version of Underscore's debounce function.
from ng-fittext.js.
Nice :)
from ng-fittext.js.
Just an idea: Think it's worth making debounce an option, so users can opt out of it, or supply a different delay?
from ng-fittext.js.
Unsure how to accomplish settings which will effect all directives (without adding an additional wrapper) - unless you simply mean making the setting more accessible within the file via a var up top?
from ng-fittext.js.
Does https://github.com/angular-ui/bootstrap/blob/master/src/pagination/pagination.js provide a good example of how to offer directive configuration? (Search that as well as the docs at http://angular-ui.github.io/bootstrap/ for "paginationConfig").
from ng-fittext.js.
Don't really understand a config that gets blown away whenever an update to the module comes along... Nor does it make sense that these settings are attributes for each directive. Needs to be independent and global - which seems to suggest setting attributes on a parent directive/controller
from ng-fittext.js.
@Skivvies added the config for you, looking into how this can be extended (in a similar fashion to jQuery plugins)
from ng-fittext.js.
Thanks @patrickmarabeas. I'm more familiar with the Angular ecosystem than jQuery. I'll keep an eye out for what you do to see what you mean.
Worth updating the README with an example of overriding the default debounce?
from ng-fittext.js.
@Skivvies see https://github.com/patrickmarabeas/jQuery-FontSpy.js
$('.bannerTextChecked').fontSpy({
onLoad: 'hideMe',
onFail: 'fontFail anotherClass'
});
extends:
(https://github.com/patrickmarabeas/jQuery-FontSpy.js/blob/master/jQuery-FontSpy.js#L24)
var defaults = {
font: $element.css("font-family"),
onLoad: '',
onFail: '',
testFont: 'Comic Sans MS',
testString: 'QW@HhsXJ',
delay: 50,
timeOut: 2500
};
from ng-fittext.js.
@Skivvies It has been implemented if you're interested. README has been updated as well : )
from ng-fittext.js.
Related Issues (20)
- dynamically call ng-fitText HOT 9
- 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.