🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

canvas-rect

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

canvas-rect - npm Package Compare versions

Comparing version

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,