Detecting click inside a path

Discuss SVG code, accessible via the XML Editor.
chancharles
Posts: 1
Joined: Tue Apr 20, 2010 2:07 pm

Detecting click inside a path

Postby chancharles » Tue Apr 20, 2010 2:10 pm

Hi, I am new to SVG and Inkscape. Is there anyway I can make the area inside a path clickable? It appears that if I use the "Create Link" in Inkscape, it only makes the path itself clickable but not the area within the path.

Any suggestion is appreciated.

Thanks!
Charles

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Detecting click inside a path

Postby microUgly » Wed Apr 21, 2010 5:49 pm

When you say clickable, do you mean to be able to select it with :tool_selector:? If so, I don't think there's anything you can do. If an object does not have a fill, or the fill is completely transparent, you can't select it.

Likewise, if an object has no fill or stroke, you can't select it at all with a click of the mouse. Instead you have to drag a selection around where you guess it would be, or switch your view mode from normal to outline.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Detecting click inside a path

Postby brynn » Thu Apr 22, 2010 2:38 am

I think he's talking about making URL links.
And I'm only guessing here. But does the path have a fill? If not, try giving it a transparent fill. If that doesn't work, try making 99.99% transparent.

If the path already has a fill, and you still have to click on the path or stroke, then I'm thinking you'll have to manipulate the code in XML Editor. Unfortunately, I know very little about XML :(

I've played around with adding links to text, but not to paths...
Last thought -- is the path closed? If not, maybe it should be closed, to allow clicking in the fill area?
Sorry, wish I could be more help. But hopefully other members will know more about it.


Return to “SVG / XML Code”