kitchen-simulator 2.0.57 → 3.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.
@@ -13,6 +13,7 @@ exports.getLinesFromItems = getLinesFromItems;
13
13
  exports.getLinesFromItems2 = getLinesFromItems2;
14
14
  exports.getLinesOfItem = getLinesOfItem;
15
15
  exports.hasMoldingLayout = hasMoldingLayout;
16
+ exports.isAttachedWall = isAttachedWall;
16
17
  exports.isEnableItemForMolding = isEnableItemForMolding;
17
18
  exports.isItemSameItemByLocation = isItemSameItemByLocation;
18
19
  exports.isItemSnappedGroup = isItemSnappedGroup;
@@ -87,6 +88,10 @@ function isEnableItemForMolding(layer, selItem) {
87
88
  // check this item is enable for specified molding
88
89
  else return result && hasMoldingLayout(molding, selItem.layoutpos);
89
90
  }
91
+ function isAttachedWall(layer, selItem) {
92
+ var allLineRects = _export.GeometryUtils.buildRectFromLines(layer, _export.GeometryUtils.getAllLines(layer));
93
+ return _export.GeometryUtils.isSnappedLine(getItemRect(selItem), allLineRects);
94
+ }
90
95
 
91
96
  /**
92
97
  * Check two line segments are overlap. The direction of the two line segments must be opposite.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitchen-simulator",
3
- "version": "2.0.57",
3
+ "version": "3.0.0",
4
4
  "description": "It is a kitchen simulator (self-contained micro-frontend).",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",