ZouYouShun / ngx-hm-carousel

a light carousel for Angular18+, support mobile touch by hammerJs
https://stackblitz.com/edit/stackblitz-starters-nkd5pk?file=src%2Fmain.ts
MIT License
60 stars 10 forks source link

font render issue (blurry fonts) if element has transitionX with decimal separator #20

Open harellevy opened 5 years ago

harellevy commented 5 years ago

if an active element in carousel landing in center sometimes its not pixel perfect and have decimal separator in translateX value. this causes blurry fonts in chrome. I think it's better to round the content grab element translateX value after transition complete. Screen Shot 2019-03-18 at 15 27 40

ZouYouShun commented 5 years ago

The first problem because we using the init width to calculate the position move value. If the image size is different with loaded the position will has some pixel different, currently, you can use a tag to contain that to solve this issue, like below.

<div>
    <component></component>
</div>

The second problem can you give me some example with stackblitz?