|
@@ -92,10 +92,10 @@ export class SGraphSvgItem extends SGraphShape {
|
|
|
* @param data 传入数据
|
|
|
* */
|
|
|
constructor(parent: SGraphItem | null, data: SGraphSvg) {
|
|
|
- super(parent, data.Style);
|
|
|
- if (data.Url) {
|
|
|
+ super(parent, data.style);
|
|
|
+ if (data.url) {
|
|
|
this.img = new Image();
|
|
|
- this.url = data.Url;
|
|
|
+ this.url = data.url;
|
|
|
this.img.onload = (e): void => {
|
|
|
this.isLoadOver = true;
|
|
|
this.update();
|
|
@@ -106,9 +106,9 @@ export class SGraphSvgItem extends SGraphShape {
|
|
|
console.log("加载图片错误!", e);
|
|
|
};
|
|
|
}
|
|
|
- this.width = data.Width;
|
|
|
- this.height = data.Height;
|
|
|
- this.moveTo(data.X, data.Y);
|
|
|
+ this.width = data.width;
|
|
|
+ this.height = data.height;
|
|
|
+ this.moveTo(data.x, data.y);
|
|
|
} // Constructor
|
|
|
|
|
|
/**
|