replace image.getAttribute("src") with image.src.
This commit is contained in:
parent
b624e26d18
commit
14e37d734c
@ -1077,7 +1077,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
svgImage.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href",
|
svgImage.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href",
|
||||||
image.nodeName === "CANVAS" ? image.toDataURL() : image.getAttribute("src"));
|
image.nodeName === "CANVAS" ? image.toDataURL() : image.src);
|
||||||
parent.appendChild(svgImage);
|
parent.appendChild(svgImage);
|
||||||
this.__currentElement = svgImage;
|
this.__currentElement = svgImage;
|
||||||
this.translate(dx, dy);
|
this.translate(dx, dy);
|
||||||
@ -1099,7 +1099,7 @@
|
|||||||
img.setAttribute("width", image.width);
|
img.setAttribute("width", image.width);
|
||||||
img.setAttribute("height", image.height);
|
img.setAttribute("height", image.height);
|
||||||
img.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href",
|
img.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href",
|
||||||
image.nodeName === "CANVAS" ? image.toDataURL() : image.getAttribute("src"));
|
image.nodeName === "CANVAS" ? image.toDataURL() : image.src);
|
||||||
pattern.appendChild(img);
|
pattern.appendChild(img);
|
||||||
this.__defs.appendChild(pattern);
|
this.__defs.appendChild(pattern);
|
||||||
} else if(image instanceof ctx) {
|
} else if(image instanceof ctx) {
|
||||||
@ -1108,7 +1108,7 @@
|
|||||||
}
|
}
|
||||||
return new CanvasPattern(pattern, this);
|
return new CanvasPattern(pattern, this);
|
||||||
};
|
};
|
||||||
|
|
||||||
ctx.prototype.setLineDash = function(dashArray) {
|
ctx.prototype.setLineDash = function(dashArray) {
|
||||||
if (dashArray && dashArray.length > 0) {
|
if (dashArray && dashArray.length > 0) {
|
||||||
this.lineDash = dashArray.join(",");
|
this.lineDash = dashArray.join(",");
|
||||||
@ -1116,7 +1116,7 @@
|
|||||||
this.lineDash = null;
|
this.lineDash = null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Not yet implemented
|
* Not yet implemented
|
||||||
*/
|
*/
|
||||||
@ -1126,7 +1126,7 @@
|
|||||||
ctx.prototype.putImageData = function(){};
|
ctx.prototype.putImageData = function(){};
|
||||||
ctx.prototype.globalCompositeOperation = function(){};
|
ctx.prototype.globalCompositeOperation = function(){};
|
||||||
ctx.prototype.setTransform = function(){};
|
ctx.prototype.setTransform = function(){};
|
||||||
|
|
||||||
//add options for alternative namespace
|
//add options for alternative namespace
|
||||||
if (typeof window === "object") {
|
if (typeof window === "object") {
|
||||||
window.C2S = ctx;
|
window.C2S = ctx;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user