easy 18.1.8 → 19.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/src/bounds.js +13 -18
package/README.md CHANGED
@@ -244,4 +244,4 @@ Automation is done with [npm scripts](https://docs.npmjs.com/misc/scripts), have
244
244
 
245
245
  ## Contact
246
246
 
247
- - james.smith@djalbat.com
247
+ * james.smith@djalbat.com
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "easy",
3
3
  "author": "James Smith",
4
- "version": "18.1.8",
4
+ "version": "19.0.0",
5
5
  "license": "MIT, Anti-996",
6
6
  "homepage": "https://github.com/djalbat/easy",
7
7
  "description": "Elements that abstract away from the DOM.",
package/src/bounds.js CHANGED
@@ -52,29 +52,24 @@ export default class Bounds {
52
52
  this.bottom = bottom;
53
53
  }
54
54
 
55
- shift(horizontalOffset, verticalOffset) {
56
- this.top += verticalOffset;
57
- this.left += horizontalOffset;
58
- this.right += horizontalOffset;
59
- this.bottom += verticalOffset;
60
- }
61
-
62
- isOverlappingMouse(mouseTop, mouseLeft) {
63
- return ( (this.top <= mouseTop)
64
- && (this.left <= mouseLeft)
65
- && (this.right > mouseLeft)
66
- && (this.bottom > mouseTop) );
67
- }
68
-
69
55
  areOverlapping(bounds) {
70
56
  const bottom = bounds.getBottom(),
71
57
  right = bounds.getRight(),
72
58
  left = bounds.getLeft(),
73
59
  top = bounds.getTop(),
74
- overlapping = ( (this.top < bottom)
75
- && (this.left < right)
76
- && (this.right > left)
77
- && (this.bottom > top) );
60
+ overlapping = ((this.top < bottom)
61
+ && (this.left < right)
62
+ && (this.right > left)
63
+ && (this.bottom > top));
64
+
65
+ return overlapping;
66
+ }
67
+
68
+ areOverlappingByTopAndLeft(top, left) {
69
+ const overlapping = ((this.top <= top)
70
+ && (this.left <= left)
71
+ && (this.right > left)
72
+ && (this.bottom > top));
78
73
 
79
74
  return overlapping;
80
75
  }