Comments (13)
Hi @francesco-incomedia. Yea this is sort of known bug. It's due to the fact draw area of svg crops everything which not belongs to it. I will look later if there is some workaround.
https://slides.com/coderitual/odoo-js#/26
The solution is to extend svg area to allow filters (like shadow) expand but the tricky part is that I don't know what kind of filters user may apply.
from bounty.
Thanks! svg width seems to solve the problem on the last character. What about the shadow on non-digit characters ("€" in my example)?
Thanks
from bounty.
I need to check whether it is caused by not enough width of non digit character or rather being covered by an adjacent neighbor.
from bounty.
Ok, I hope it could be fixed.
The problem on the last character should be solved with a workaroud adding an empty space at the end of the animated text.
from bounty.
yea, but the problem is how big this space should be. Normally you don't want the library to occupy space which is not necessary. It depends of parameters of the filter you may use.
from bounty.
@coderitual The text-shadow issue on non-digit characters seems to be caused from the applied filter.
It seems that can be solved editing this code
const createCharacter = (svg, el, fontSize) =>
svg
::append('g')
::append('text')
::style('filter', url(#createShadowFailFilter)
)
::text(el);
into this:
const createCharacter = (svg, el, fontSize) =>
svg
::append('g')
::append('text')
::text(el);
What do you think about it?
from bounty.
Thanks for the investigation! I forgot back then I had some shadow issue on some browsers. Could you please create PR for this? I will test on different browsers if it works.
from bounty.
Ok, done. Tried on Chrome, Firefox and Safari on iPhone and seems to worls fine.
from bounty.
Cool. Could you please remove definition of createShadowFailFilter. I think it will no longer be needed. One thing I am worried is safari browser (on ios and mac os).
from bounty.
Yes, I've updated the pull request. I can check on Safari (Mac) later.
On Edge there are no text-shadow effects visible (nor with this update and with your original code).
Francesco
from bounty.
On Safari seems to be ok too...
from bounty.
Thanks for the effort :)
from bounty.
It's published as 1.2.1. Thanks @francesco-incomedia for the contribution!
from bounty.
Related Issues (20)
- how to animate the number change without the slot machine effect ? HOT 5
- broken on safari HOT 11
- optimize svg loading "especially for chrome" HOT 6
- remove prefixed 0s HOT 2
- SVG Attribute heights HOT 4
- "initialValue" to "value" does't work well on Firefox HOT 8
- Provide unminified es5 version of library HOT 1
- Eplorer compatibility HOT 3
- Text rendering in Chrome HOT 3
- Problem with selection HOT 1
- Pale text rendering in iOS HOT 8
- Duration doesn't seem to work HOT 2
- Make the text animation from left to right HOT 1
- Update and or destroy method HOT 1
- Accessibility HOT 1
- Letter Spacing doesn't seem to work HOT 1
- Background for each digit?
- Performance on Safari is very slow, barely works HOT 6
- Upgrade to the newest webpack
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 bounty.