@spb-web/box-overlay
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -0,1 +1,7 @@ | ||
#### 0.4.1 (2021-01-20) | ||
##### Bug Fixes | ||
* fixed Rect ([405b64ea](https://github.com/spb-web/boxOverlay/commit/405b64ea7932234c9a06770ee61aafb2e69d9ab3)) | ||
### 0.4.0 (2021-01-20) | ||
@@ -2,0 +8,0 @@ |
@@ -43,2 +43,26 @@ import { createNanoEvents } from 'nanoevents'; | ||
} | ||
/** | ||
* @property {number} top | ||
*/ | ||
get top() { | ||
return this.y + Math.min(0, this.height); | ||
} | ||
/** | ||
* @property {number} bottom | ||
*/ | ||
get bottom() { | ||
return this.y + Math.max(0, this.height); | ||
} | ||
/** | ||
* @property {number} left | ||
*/ | ||
get left() { | ||
return this.x + Math.min(0, this.width); | ||
} | ||
/** | ||
* @property {number} right | ||
*/ | ||
get right() { | ||
return this.x + Math.max(0, this.width); | ||
} | ||
} | ||
@@ -250,3 +274,3 @@ | ||
* | ||
* boxOverlay.add(ELEMENT_TO_BE_SELECTED) | ||
* boxOverlay.add(ELEMENT_TO_BE_HIGHLIGHTED) | ||
* boxOverlay.start() | ||
@@ -253,0 +277,0 @@ * |
{ | ||
"name": "@spb-web/box-overlay", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "no dependencies, works with animated elements, simple api, typescript, modern, can highlight multiple elements", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -16,3 +16,3 @@ import { Overlay } from './Overlay'; | ||
* | ||
* boxOverlay.add(ELEMENT_TO_BE_SELECTED) | ||
* boxOverlay.add(ELEMENT_TO_BE_HIGHLIGHTED) | ||
* boxOverlay.start() | ||
@@ -19,0 +19,0 @@ * |
@@ -17,2 +17,18 @@ export declare class Rect { | ||
constructor(x?: number, y?: number, width?: number, height?: number); | ||
/** | ||
* @property {number} top | ||
*/ | ||
get top(): number; | ||
/** | ||
* @property {number} bottom | ||
*/ | ||
get bottom(): number; | ||
/** | ||
* @property {number} left | ||
*/ | ||
get left(): number; | ||
/** | ||
* @property {number} right | ||
*/ | ||
get right(): number; | ||
} |
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
22353
553