Fixed issues 529 and 530, started some work on better <a> element support

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1511 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Alexis Deveria
2010-04-08 13:34:18 +00:00
parent d2bbd0b127
commit 8841ec47db
2 changed files with 27 additions and 31 deletions

View File

@@ -963,12 +963,7 @@
// updates the toolbar (colors, opacity, etc) based on the selected element
// This function also updates the opacity and id elements that are in the context panel
var updateToolbar = function() {
if (selectedElement != null &&
selectedElement.tagName != "image" &&
selectedElement.tagName != "text" &&
selectedElement.tagName != "foreignObject" &&
selectedElement.tagName != "g")
{
if (selectedElement != null && $.inArray(selectedElement.tagName, ['image', 'text', 'foreignObject', 'g', 'a']) === -1) {
// get opacity values
var fillOpacity = parseFloat(selectedElement.getAttribute("fill-opacity"));
if (isNaN(fillOpacity)) {
@@ -1062,6 +1057,15 @@
#ellipse_panel, #line_panel, #text_panel, #image_panel').hide();
if (elem != null) {
var elname = elem.nodeName;
// If this is a link with no transform and one child, pretend
// its child is selected
// console.log('go', elem)
// if(elname === 'a') { // && !$(elem).attr('transform')) {
// elem = elem.firstChild;
// }
var angle = svgCanvas.getRotationAngle(elem);
$('#angle').val(angle);