Added class support

master
Francesco Strappini 2015-09-24 16:15:34 +02:00
parent 1dfa0b6b86
commit 1f11691c60
2 changed files with 6 additions and 1 deletions

View File

@ -208,6 +208,10 @@ by creating the following file and adding by calls to svgEditor.setConfig -->
<span>id:</span>
<input id="elem_id" class="attr_changer" data-attr="id" size="10" type="text"/>
</label>
<label id="classLabel" title="Element class">
<span>class:</span>
<input id="elem_class" class="attr_changer" data-attr="class" size="10" type="text"/>
</label>
</div>
<label id="tool_angle" title="Change rotation angle" class="toolset">

View File

@ -1527,6 +1527,7 @@ TODOS
$('#group_opacity').val(opac_perc);
$('#opac_slider').slider('option', 'value', opac_perc);
$('#elem_id').val(selectedElement.id);
$('#elem_class').val(selectedElement.getAttribute("class"));
}
updateToolButtonState();
@ -2991,7 +2992,7 @@ TODOS
return false;
}
if (attr !== 'id') {
if (attr !== 'id' && attr!=='class') {
if (isNaN(val)) {
val = svgCanvas.convertToNum(attr, val);
} else if (curConfig.baseUnit !== 'px') {