Jump to content

dynamic links on canvas (html 5)


KoviRobi

Recommended Posts

Hello!I have been experimenting with the HTML 5's canvas element to make a circle radial navigation menu.However, since it is a navigation menu, I need to make links, and I am not sure how to do that with dynamically made objects.I have uploaded the nessesary files tokovirobi.x10.mx(the files are index.html, menu.js and rmb.js --even though you need to shift click the left mouse button)Also included an image to help those who do not understand what I am doingKoviRobi(EDIT: If you want me to annotate the rmb.js file fully, I will.)

Link to comment
Share on other sites

I need to make links, and I am not sure how to do that with dynamically made objects.
One thing appears fairly obvious. You will need to position your links relative to the center of your circle, so that they retain their position relative to each new absolute position of the circle.Roddy
Link to comment
Share on other sites

A quick search on google and I can't find you an answer :/ I'm not sure if you can put links in a canvas tag, though I have no experience using the tag. Your best bet is it to do what iwato said above though your radial menu would be useless. If you do find a way could you post it here please because this search has made me interested in the canvas tag. :)

Link to comment
Share on other sites

Thank you, but my question is rather how to place the links, not where to position them, because I tried addEventListener();, but it did not accept it
Relative position is both a geographical reference and a method of placement.My brief look at the specs for the canvas element suggests that your links must be entered as hotspots (an image map) on your PNG image.Sorry, that I cannot be of more help.I have no experience with the canvas element, but like the clickable effect that it produces.Roddy
Link to comment
Share on other sites

Whoops! Something happened to it! Go check it out!Thank you guys, I will of course experiment with adding a dynamic image map into the easel to achieve my original aims. But untill then, I changed my approach, and it works.Of course, you can, if you want use my script, just have a look at how to embed it in the index.html and look at the options in the menu.js.If you have any questions about the script contact me (PM or E-Mail (included in the lmb.js file, be careful, I have renamed it from its original rmb.js)).This script is still in development and documentation, contact me if you want the final version.Now I know a bit more about CSS thanks to iwatoThank you for your help and patience

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...