Code Monkey home page Code Monkey logo

Comments (9)

louisdoe avatar louisdoe commented on June 1, 2024

Is it possible to "refresh" the action of ng-fitText please ?

from ng-fittext.js.

patrickmarabeas avatar patrickmarabeas commented on June 1, 2024

Could you create a demo (jsfiddle etc) to demonstrate the requirement / issue?

from ng-fittext.js.

louisdoe avatar louisdoe commented on June 1, 2024

yes here it is: http://codepen.io/LouisDoe/pen/rxGQpZ

from ng-fittext.js.

patrickmarabeas avatar patrickmarabeas commented on June 1, 2024

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 both ng-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.

patrickmarabeas avatar patrickmarabeas commented on June 1, 2024

I see I spudded out when I added the dynamic stuff. ngModel instead of ngBind. Duhh.

from ng-fittext.js.

louisdoe avatar louisdoe commented on June 1, 2024

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.

louisdoe avatar louisdoe commented on June 1, 2024

@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.

patrickmarabeas avatar patrickmarabeas commented on June 1, 2024

Exactly the same. data-ng-model="computed.userLengthFtin + ' x ' + ... "

from ng-fittext.js.

louisdoe avatar louisdoe commented on June 1, 2024

ok perfect, thanks Patrick !

from ng-fittext.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.