Merge pull request #13 from mynext/master

Added class support
master
Jeff Schiller 2015-10-12 07:24:48 -07:00
commit b8fc4eef01
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') {