fix typo and change getFloatTrait to getAttribute
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@19 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
e7a483f029
commit
cf317f0171
20
svgcanvas.js
20
svgcanvas.js
|
@ -307,12 +307,12 @@ function SvgCanvas(doc)
|
||||||
{
|
{
|
||||||
case "select":
|
case "select":
|
||||||
element = svgdoc.getElementById("rect_" + obj_num);
|
element = svgdoc.getElementById("rect_" + obj_num);
|
||||||
if (element.getFloatTrait('width') == 0 &&
|
if (element.getAttribute('width') == 0 &&
|
||||||
if (element.getFloatTrait('height') == 0) {
|
element.getAttribute('height') == 0) {
|
||||||
// only one element is selected and stored in selected variable (or null)
|
// only one element is selected and stored in selected variable (or null)
|
||||||
} else {
|
} else {
|
||||||
// element.getFloatTrait('x')
|
// element.getAttribute('x')
|
||||||
// element.getFloatTrait('y')
|
// element.getAttribute('y')
|
||||||
// should scan elements which are in rect(x,y,width,height) and select them
|
// should scan elements which are in rect(x,y,width,height) and select them
|
||||||
}
|
}
|
||||||
element.parentNode.removeChild(element);
|
element.parentNode.removeChild(element);
|
||||||
|
@ -326,8 +326,8 @@ function SvgCanvas(doc)
|
||||||
break;
|
break;
|
||||||
case "line":
|
case "line":
|
||||||
element = svgdoc.getElementById("line_" + obj_num);
|
element = svgdoc.getElementById("line_" + obj_num);
|
||||||
if (element.getFloatTrait('x1') == element.getFloatTrait('x2') &&
|
if (element.getAttribute('x1') == element.getAttribute('x2') &&
|
||||||
element.getFloatTrait('y1') == element.getFloatTrait('y2')) {
|
element.getAttribute('y1') == element.getAttribute('y2')) {
|
||||||
element.parentNode.removeChild(element);
|
element.parentNode.removeChild(element);
|
||||||
element = null;
|
element = null;
|
||||||
} else {
|
} else {
|
||||||
|
@ -338,8 +338,8 @@ function SvgCanvas(doc)
|
||||||
case "square":
|
case "square":
|
||||||
case "rect":
|
case "rect":
|
||||||
element = svgdoc.getElementById("rect_" + obj_num);
|
element = svgdoc.getElementById("rect_" + obj_num);
|
||||||
if (element.getFloatTrait('width') == 0 &&
|
if (element.getAttribute('width') == 0 &&
|
||||||
element.getFloatTrait('height') == 0) {
|
element.getAttribute('height') == 0) {
|
||||||
element.parentNode.removeChild(element);
|
element.parentNode.removeChild(element);
|
||||||
element = null;
|
element = null;
|
||||||
} else {
|
} else {
|
||||||
|
@ -350,8 +350,8 @@ function SvgCanvas(doc)
|
||||||
case "circle":
|
case "circle":
|
||||||
case "ellipse":
|
case "ellipse":
|
||||||
element = svgdoc.getElementById("ellipse_" + obj_num);
|
element = svgdoc.getElementById("ellipse_" + obj_num);
|
||||||
if (element.getFloatTrait('rx') == 0 &&
|
if (element.getAttribute('rx') == 0 &&
|
||||||
element.getFloatTrait('ry') == 0) {
|
element.getAttribute('ry') == 0) {
|
||||||
element.parentNode.removeChild(element);
|
element.parentNode.removeChild(element);
|
||||||
element = null;
|
element = null;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue