softwaretailoring / wheelnav

Animated wheel navigation JavaScript library based on Raphaël.js (SVG/VML). It can be a pie menu (radial menu, circular menu) and many more.
https://wheelnavjs.softwaretailoring.net
MIT License
700 stars 101 forks source link

Error: <path> attribute d: Expected number, "M,0,0". #86

Closed ChristianBielak closed 5 years ago

ChristianBielak commented 5 years ago

Hi,

i'm try to use wheelnav js with Vue.js and typescript. Finally i got it running but now when the nevaigation is created, i get the error

Error: attribute d: Expected number, "M,0,0".

Would be glad if someone has a solution.

Thanks for help :)

Chris

softwaretailoring commented 5 years ago

Hi Chris,

What type of raphael do you use? I suggest this: <script src="https://cdn.jsdelivr.net/npm/wheelnav@1.7.1/js/dist/raphael.min.js"></script>

And you can find wheelnav on jsdelivr also: https://www.jsdelivr.com/package/npm/wheelnav

ChristianBielak commented 5 years ago

Hi,

currently I'm using 2.2.7. I'll try your suggested version. Thanks for your fast reply.

jodybrabec commented 5 years ago

The following works for me. In raphael.js, REPLACE: el.setAttribute(key, Str(attr[key])); WITH: var strValue = Str(attr[key]); if (key === "d" && strValue === "M,0,0") { strValue = "M0,0"; } el.setAttribute(key, strValue);

hadasmaimon commented 3 years ago

in my case, the arrow line was smaller than the arrow-end triangle, so I set the min size of the path to be 11 var subPathStr = guidePath.getSubpath(0, Math.max(11, thisLength));