Comments (6)
I would guess based on that error that the code is using VDOM and that the new code which is checking for instanceof SVGPathElement fails due to the comparison being run on a virtual element.
I changed the code to check tagName === 'PATH' like the last version used and moved the version to 1.0.1. Please let me know if this helps. You may need to change the link to https://unpkg.com/browse/[email protected]/dist/polymorph.min.js
to lock in the version (I am not sure how long unpkg caches for, so you may or may not need to do this).
Please let me know if this helps.
from polymorph.
@notoriousb1t I am afraid it is still not working. I've cleared cache, checked in console that I am using the latest 1.0.1
version, but no luck.
I am linking to this file https://unpkg.com/[email protected]/dist/polymorph.min.js
Uncaught Error: Unsupported element path
at Z (polymorph.min.js:4)
at polymorph.min.js:88
at new tr (polymorph.min.js:88)
at polymorph.min.js:89
at Array.map (<anonymous>)
at Object.r.interpolate (polymorph.min.js:89)
from polymorph.
Could you provide a link to the site that is not working? I am afraid I can't help any further without something to debug. The tagName of Element should return in full uppercase (which is what all browsers should be doing). The fact that it is in lowercase is a bit baffling.
The error is being thrown here: https://github.com/notoriousb1t/polymorph/blob/master/src/getPath.ts#L39.
from polymorph.
Sure thing. Here is one part of the code from that website isolated without anything else. Guess it is easier for you this way, without stuff that is not needed.
from polymorph.
Okay, try `https://unpkg.com/[email protected]/dist/polymorph.min.js'. It turns out I wasn't entirely right about tagName. It is in uppercase for HTML elements, but SVG elements aren't HTML elements, so they can be lowercase. I changed to code to be incase-sensitive.
from polymorph.
All back to normal!
And I learned something along the way. Thanks :)
from polymorph.
Related Issues (13)
- name is now output.name
- chore() update deps and bump version HOT 1
- GPL 3 vs. MIT HOT 4
- Greenkeeper spam branches
- npm polymorph demo broken HOT 1
- dead site link HOT 1
- security vulnerabilities 63 low, 2 moderate, 7 high HOT 5
- Webpack grabbing es2015 version instead – fails to run on older browser HOT 4
- This library can work with Expo HOT 2
- The path is getting NaN sometimes HOT 1
- works not good with some shapes HOT 4
- Error from UglifyJS HOT 6
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 polymorph.