Giter Club home page Giter Club logo

Comments (9)

nashio avatar nashio commented on September 23, 2024

Hi @Nageshwar , not sure I follow. Isn't that what its happening right now?
for ex. if I hover from 2.0 to 2.5 then 2.5 stars will be filled.
please elaborate, thank you

from star-rating-svg.

Nageshwar avatar Nageshwar commented on September 23, 2024

Hello @nashio ,

I would like to Show the intial rating of star when the value will be 4.7 then the star will be 5 prefilled as please check screenshot.

screenshot_22

but what actually happening is for 4.7 star the image is showing 4.5 stars not 5.

Did you understand now, what i mean?

from star-rating-svg.

nashio avatar nashio commented on September 23, 2024

I see, on initial load then. Yeah right now its rounding down, you need up.
hm, I'm thinking maybe of adding an option to round both ways, could be useful.

from star-rating-svg.

Nageshwar avatar Nageshwar commented on September 23, 2024

Yes but half rounding will be great (Y)

For example 4.1 should be 4.5 not 5.

Thanks @nashio

from star-rating-svg.

nashio avatar nashio commented on September 23, 2024

yeah thats what I meant actually, 4.1 -> 4.5, instead of 4.0

from star-rating-svg.

Nageshwar avatar Nageshwar commented on September 23, 2024

Yes

That will be great (y)

Thanks in Advance

from star-rating-svg.

nashio avatar nashio commented on September 23, 2024

@Nageshwar
download the newest version and use the option, forceRoundUp: true.
check the readme for reference: https://github.com/nashio/star-rating-svg/blob/master/README.md
let me know if that works for you

from star-rating-svg.

Nageshwar avatar Nageshwar commented on September 23, 2024

Great (y)

Thanks , I will surely let you know.

from star-rating-svg.

Nageshwar avatar Nageshwar commented on September 23, 2024

Yes it worked perfectly
for my testcases:
rating 4.7 it shows 5,
rating 4.001 it shows 4.5
rating 4.00 it shows 4.

Great work @nashio

from star-rating-svg.

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.