Fix issue 934. Patch by adambender.
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2083 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -241,7 +241,7 @@ svgedit.units.convertToNum = function(attr, val) {
|
||||
// Parameters:
|
||||
// attr - String with the name of the attribute associated with the value
|
||||
// val - String with the attribute value to check
|
||||
svgedit.units.isValidUnit = function(attr, val) {
|
||||
svgedit.units.isValidUnit = function(attr, val, selectedElement) {
|
||||
var valid = false;
|
||||
if(unit_attrs.indexOf(attr) >= 0) {
|
||||
// True if it's just a number
|
||||
@@ -267,7 +267,7 @@ svgedit.units.isValidUnit = function(attr, val) {
|
||||
// not already present
|
||||
try {
|
||||
var elem = elementContainer_.getElement(val);
|
||||
result = (elem == null);
|
||||
result = (elem == null || elem === selectedElement);
|
||||
} catch(e) {}
|
||||
return result;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user