|
|
@@ -37,7 +37,7 @@ class DrawCanvas {
|
|
|
this._ctx.fillStyle = this._style.fillStyle
|
|
|
const X = x - (this._style.w / 2)
|
|
|
const Y = y - (this._style.h / 2)
|
|
|
- this._ctx.fillRect(X,Y, this._style.w, this._style.h)
|
|
|
+ this._ctx.fillRect(X, Y, this._style.w, this._style.h)
|
|
|
console.log('画图并存储');
|
|
|
}
|
|
|
|
|
|
@@ -59,9 +59,9 @@ class DrawCanvas {
|
|
|
for (let j = 0; j < el.path.length; j++) {
|
|
|
const es = el.path[j];
|
|
|
this._ctx.fillStyle = el.style.fillStyle
|
|
|
- const X = es[0] - (el._style.w / 2)
|
|
|
- const Y = es[1] - (el._style.h / 2)
|
|
|
- this._ctx.fillRect(X,Y, el.style.w, el.style.h)
|
|
|
+ const X = es[0] - (el.style.w / 2)
|
|
|
+ const Y = es[1] - (el.style.h / 2)
|
|
|
+ this._ctx.fillRect(X, Y, el.style.w, el.style.h)
|
|
|
}
|
|
|
}
|
|
|
}
|