Closed GoogleCodeExporter closed 9 years ago
This issue will be to support the <a> link element in SVG-edit.
Original comment by codedr...@gmail.com
on 25 Aug 2009 at 10:07
Original comment by codedr...@gmail.com
on 25 Aug 2009 at 10:07
Original comment by adeve...@gmail.com
on 25 Aug 2009 at 11:32
Any thoughts on the UI for this?
Original comment by codedr...@gmail.com
on 17 Sep 2009 at 3:34
Note: the whitelist and code was recently updated to support <a> elements upon
loading. There is still no UI for this feature yet though. Suggestions?
Original comment by codedr...@gmail.com
on 30 Jan 2010 at 2:07
We could maybe have a "link icon" which would appear (maybe an "open link"
icon) for
any selected element.
When clicked, this would open a text field like the one we have for the image
URL,
and the user would enter their link. The "open link" icon would then become a
"closed
link" icon.
Unlinking could be done either by erasing the existing link (blanking the link
field), or clicking again on the link icon?
Original comment by worms_...@yahoo.com
on 30 Jan 2010 at 2:58
Is there a chance that this can be implemented soon, The <a> elelemnt
whitelisting is
a starting point. Thanks.
I am asking because that is a missing feature for replacing twikidraw format by
SVG.
Perhaps a student wants to do that converter in our project as a part time
project
among together with e.g.
moin DOM tree -> SVG or something else
(http://moinmo.in/GoogleSoc2010/InitialProjectIdeas). Doing such a convertor
will
make it much easier to migrate for many different projects to svg-edit.
Original comment by rb.p...@gmail.com
on 20 Mar 2010 at 11:35
rb.proj: I'm still trying to think up decent UI for this. I'm not terribly
happy
with a 'link' button in the selected contextual panel: what happens when you
click
the button? How do you tell if an element is already linked and what its URI
is?
I'm looking for some decent UI suggestions here to move forward.
Original comment by codedr...@gmail.com
on 29 Mar 2010 at 3:32
After some testing and spec reading, I notice the <a> element in SVG is very
much
the same as the <g> element, except of course for its linking abilities. Not
just
similar because it can contain elements, but also because you can set
transforms,
styling and other attributes on it that will apply to its children.
Therefore, I wonder if we shouldn't just treat it as a special type of group.
So thinking aloud, let me make these suggestions:
- "Make link" button in context menu for any element, and multiple selected
elements. A dialog box will appear asking for the URL. If left blank, no action
should take place. If element is a <g>, convert it into an <a>. If not, wrap it
into
an <a>.
- A selected <a> element with one child has the context menu of that child. One
with
more has the context menu like <g> elements do.
- A selected <a> element with transforms and/or multiple children has the same
context menu as a <g> element.
- All <a> elements should include these buttons:
* Edit (a button, shows link as tooltip when hovered)
* Remove link (removes <a> wrapper if one child and no other attributes,
converts to <g> otherwise)
We could also do without the "Remove link" and perform the "remove" action if
the
URL is made empty. But that might be asking the user to do too much.
The fact that an element would have an "edit link" button would hopefully be
enough
to indicate that this element had a link...
This will be a bit complicated for us to implement, but I considering the way
SVG
works I believe it would be the most intuitive to users.
Original comment by adeve...@gmail.com
on 7 Apr 2010 at 4:08
Too complex for 2.5 timeframe, so bumping to 2.6.
Original comment by adeve...@gmail.com
on 14 Apr 2010 at 7:36
This may be a bit easier to do now we have better child <svg> support, as
manipulation would work in a similar way.
Original comment by adeve...@gmail.com
on 27 Jul 2010 at 11:25
It would be great to also have the ability to export to imagemap - so that if
you're saving as png, you can get a paired imagemap so the links work in the
non-svg view too
(I'm making a WikiDrawPlugin replacement for the old twikidraw/jhotdraw for
foswiki atm.
Sven
Original comment by svendowi...@home.org.au
on 25 Sep 2010 at 3:45
Hi
you may be interested in our changes to the exportHandler
http://hg.moinmo.in/moin/2.0-dev/file/df22bcb037d9/MoinMoin/static/applets/svg-e
dit/svg-editor.js#l548
Do you work on a twdraw format convertor to svg?
Original comment by rb.p...@gmail.com
on 25 Sep 2010 at 2:22
As mentioned on the mailing list, I think this now has become much easier with
the addition of the right-click menu:
1) Add a separator and some items per element menu:
* Add/Edit Link
* Remove Link
2) An element has a link if its immediate parent is an <a> element
3) The Remove Link item need only be selectable if there is already a link on
this element
4) Add/Edit Link will bring up a dialog asking for a URL
a) the URL is only acceptable if it is a http: or https: URL
5) Add/Edit Link will:
a) add the xmlns:xlink to the outer <svg> if not present
b) wrap the element in an <a> element pointing at the URL
Original comment by codedr...@gmail.com
on 4 Nov 2010 at 12:15
Hmm, not sure if the context menu is the best place for something that will
(probably) not be used often...at least not unless we enhance the menu as
suggested before to manage many options better.
For #4 - What about a # reference or data URL? Or a relative path or an FTP
URL? Yeah, unlikely, but it's possible people would need these.
Original comment by adeve...@gmail.com
on 5 Nov 2010 at 6:47
Original comment by adeve...@gmail.com
on 30 Nov 2010 at 9:32
Basic functionality available in r1878. Went with a single button/URL field for
now, so as not to clutter the context menu. Link can be removed by clearing out
the URL field, though we should probably find a more practical way to do so.
Another remaining TODO is the conversion from g to a if a single group is made
a link. Not a high priority though.
I've also made sure that you can double-click any link element to edit inside
it, just like with groups.
Original comment by adeve...@gmail.com
on 1 Dec 2010 at 5:59
One more TODO for you - at the moment when you delete an element with a
hyperlink, the hyperlink itself isn't fully removed from the code.
Original comment by adrianbj...@gmail.com
on 1 Dec 2010 at 9:53
Original issue reported on code.google.com by
rb.p...@gmail.com
on 25 Aug 2009 at 6:37