canvas-rect
Advanced tools
Comparing version 0.1.0 to 0.1.1
15
index.js
@@ -103,8 +103,6 @@ /** | ||
const heigth = to.y-from.y | ||
this._ctx.lineWidth = this.options.lineWidth | ||
this._ctx.strokeStyle = this.options.lineColor | ||
this._drawRect(from.x,from.y,width,heigth) | ||
this._storedAccords.forEach(({x,y,w,h})=>{ | ||
this._ctx.strokeRect(x,y,w,h) | ||
}) | ||
this._ctx.strokeRect(from.x,from.y,width,heigth) | ||
this._to = to; | ||
@@ -122,2 +120,11 @@ this._lastRecord = { | ||
*/ | ||
_drawRect(x,y,w,h) { | ||
this._ctx.lineWidth = this.options.lineWidth | ||
this._ctx.strokeStyle = this.options.lineColor | ||
this._ctx.strokeRect(x,y,w,h) | ||
} | ||
/** | ||
* @memberof DrawRect | ||
* @private | ||
*/ | ||
_handleUp() { | ||
@@ -269,3 +276,3 @@ // if preserve, store last accordions | ||
} | ||
this._ctx.strokeRect(x,y,width,height) | ||
this._drawRect(x,y,width,height) | ||
this._lastRecord = { | ||
@@ -272,0 +279,0 @@ x: 0, |
{ | ||
"name": "canvas-rect", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "canvas rect drawing on element", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -103,8 +103,6 @@ /** | ||
const heigth = to.y-from.y | ||
this._ctx.lineWidth = this.options.lineWidth | ||
this._ctx.strokeStyle = this.options.lineColor | ||
this._drawRect(from.x,from.y,width,heigth) | ||
this._storedAccords.forEach(({x,y,w,h})=>{ | ||
this._ctx.strokeRect(x,y,w,h) | ||
}) | ||
this._ctx.strokeRect(from.x,from.y,width,heigth) | ||
this._to = to; | ||
@@ -122,2 +120,11 @@ this._lastRecord = { | ||
*/ | ||
_drawRect(x,y,w,h) { | ||
this._ctx.lineWidth = this.options.lineWidth | ||
this._ctx.strokeStyle = this.options.lineColor | ||
this._ctx.strokeRect(x,y,w,h) | ||
} | ||
/** | ||
* @memberof DrawRect | ||
* @private | ||
*/ | ||
_handleUp() { | ||
@@ -269,3 +276,3 @@ // if preserve, store last accordions | ||
} | ||
this._ctx.strokeRect(x,y,width,height) | ||
this._drawRect(x,y,width,height) | ||
this._lastRecord = { | ||
@@ -272,0 +279,0 @@ x: 0, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22762
627