kitchen-simulator 11.13.0 → 11.15.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.
package/es/class/item.js
CHANGED
|
@@ -15,6 +15,7 @@ import { hasMoldingLayout } from "../utils/molding";
|
|
|
15
15
|
import { getInstallationSuffix, isEmpty } from "../components/viewer2d/utils";
|
|
16
16
|
import { historyPush } from "../utils/history";
|
|
17
17
|
import { toJSIfNeeded } from "../shared/objects/immutable";
|
|
18
|
+
import { isWarningCabinet } from "../shared/domain/cabinet-warning";
|
|
18
19
|
var allItemRect;
|
|
19
20
|
var allItemSnap;
|
|
20
21
|
var allLines;
|
|
@@ -1320,19 +1321,6 @@ var Item = /*#__PURE__*/function () {
|
|
|
1320
1321
|
var itemID = data.id;
|
|
1321
1322
|
var curItem = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
|
|
1322
1323
|
var layer = state.getIn(['scene', 'layers', layerID]);
|
|
1323
|
-
var tmpMolding = _toConsumableArray(curItem.molding);
|
|
1324
|
-
var temp_item_molding = _toConsumableArray(curItem.molding);
|
|
1325
|
-
temp_item_molding = temp_item_molding.filter(function (md) {
|
|
1326
|
-
return itemCDS === null || itemCDS === void 0 ? void 0 : itemCDS.some(function (ds) {
|
|
1327
|
-
return ds.itemID === md.itemID;
|
|
1328
|
-
});
|
|
1329
|
-
});
|
|
1330
|
-
tmpMolding.forEach(function (md) {
|
|
1331
|
-
var itemGroup = MoldingUtils.getItemGroupFromMolding(layer, curItem, md);
|
|
1332
|
-
itemGroup.forEach(function (it) {
|
|
1333
|
-
state = state.setIn(['scene', 'layers', layerID, 'items', it.id, 'molding'], temp_item_molding);
|
|
1334
|
-
});
|
|
1335
|
-
});
|
|
1336
1324
|
var cds = itemCDS === null || itemCDS === void 0 ? void 0 : itemCDS.find(function (elem) {
|
|
1337
1325
|
return elem.itemID === data.itemID;
|
|
1338
1326
|
});
|
|
@@ -1429,6 +1417,19 @@ var Item = /*#__PURE__*/function () {
|
|
|
1429
1417
|
})
|
|
1430
1418
|
};
|
|
1431
1419
|
state = state.mergeIn(['scene', 'layers', layerID, 'items', itemID, 'doorStyle'], fromJS(tmpDS));
|
|
1420
|
+
var tmpMolding = _toConsumableArray(curItem.molding);
|
|
1421
|
+
// let temp_item_molding = [...curItem.molding];
|
|
1422
|
+
var itemGroup = [];
|
|
1423
|
+
tmpMolding.forEach(function (md) {
|
|
1424
|
+
var _itemGroup;
|
|
1425
|
+
itemGroup = MoldingUtils.getItemGroupFromMolding(layer, curItem, md);
|
|
1426
|
+
itemGroup = (_itemGroup = itemGroup) === null || _itemGroup === void 0 ? void 0 : _itemGroup.filter(function (it) {
|
|
1427
|
+
return isWarningCabinet(it);
|
|
1428
|
+
});
|
|
1429
|
+
itemGroup.forEach(function (it) {
|
|
1430
|
+
state = state.setIn(['scene', 'layers', layerID, 'items', it.id, 'molding'], []);
|
|
1431
|
+
});
|
|
1432
|
+
});
|
|
1432
1433
|
};
|
|
1433
1434
|
|
|
1434
1435
|
// 🔥 Apply to resolved items
|
|
@@ -2184,9 +2184,9 @@ function addItem(sceneData, planData, layer, itemID, catalog, itemsActions) {
|
|
|
2184
2184
|
if (_item4.category === ITEM_TYPE.CABINET) {
|
|
2185
2185
|
if (!isWarningCabinet(item)) {
|
|
2186
2186
|
pivot.children.pop();
|
|
2187
|
-
} else {
|
|
2188
|
-
pivot.children.pop();
|
|
2189
2187
|
}
|
|
2188
|
+
} else {
|
|
2189
|
+
pivot.children.pop();
|
|
2190
2190
|
}
|
|
2191
2191
|
}
|
|
2192
2192
|
}
|
package/lib/class/item.js
CHANGED
|
@@ -20,6 +20,7 @@ var _molding = require("../utils/molding");
|
|
|
20
20
|
var _utils = require("../components/viewer2d/utils");
|
|
21
21
|
var _history = require("../utils/history");
|
|
22
22
|
var _immutable2 = require("../shared/objects/immutable");
|
|
23
|
+
var _cabinetWarning = require("../shared/domain/cabinet-warning");
|
|
23
24
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24
25
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25
26
|
var allItemRect;
|
|
@@ -1327,19 +1328,6 @@ var Item = exports["default"] = /*#__PURE__*/function () {
|
|
|
1327
1328
|
var itemID = data.id;
|
|
1328
1329
|
var curItem = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
|
|
1329
1330
|
var layer = state.getIn(['scene', 'layers', layerID]);
|
|
1330
|
-
var tmpMolding = (0, _toConsumableArray2["default"])(curItem.molding);
|
|
1331
|
-
var temp_item_molding = (0, _toConsumableArray2["default"])(curItem.molding);
|
|
1332
|
-
temp_item_molding = temp_item_molding.filter(function (md) {
|
|
1333
|
-
return itemCDS === null || itemCDS === void 0 ? void 0 : itemCDS.some(function (ds) {
|
|
1334
|
-
return ds.itemID === md.itemID;
|
|
1335
|
-
});
|
|
1336
|
-
});
|
|
1337
|
-
tmpMolding.forEach(function (md) {
|
|
1338
|
-
var itemGroup = _export2.MoldingUtils.getItemGroupFromMolding(layer, curItem, md);
|
|
1339
|
-
itemGroup.forEach(function (it) {
|
|
1340
|
-
state = state.setIn(['scene', 'layers', layerID, 'items', it.id, 'molding'], temp_item_molding);
|
|
1341
|
-
});
|
|
1342
|
-
});
|
|
1343
1331
|
var cds = itemCDS === null || itemCDS === void 0 ? void 0 : itemCDS.find(function (elem) {
|
|
1344
1332
|
return elem.itemID === data.itemID;
|
|
1345
1333
|
});
|
|
@@ -1436,6 +1424,19 @@ var Item = exports["default"] = /*#__PURE__*/function () {
|
|
|
1436
1424
|
})
|
|
1437
1425
|
};
|
|
1438
1426
|
state = state.mergeIn(['scene', 'layers', layerID, 'items', itemID, 'doorStyle'], (0, _immutable.fromJS)(tmpDS));
|
|
1427
|
+
var tmpMolding = (0, _toConsumableArray2["default"])(curItem.molding);
|
|
1428
|
+
// let temp_item_molding = [...curItem.molding];
|
|
1429
|
+
var itemGroup = [];
|
|
1430
|
+
tmpMolding.forEach(function (md) {
|
|
1431
|
+
var _itemGroup;
|
|
1432
|
+
itemGroup = _export2.MoldingUtils.getItemGroupFromMolding(layer, curItem, md);
|
|
1433
|
+
itemGroup = (_itemGroup = itemGroup) === null || _itemGroup === void 0 ? void 0 : _itemGroup.filter(function (it) {
|
|
1434
|
+
return (0, _cabinetWarning.isWarningCabinet)(it);
|
|
1435
|
+
});
|
|
1436
|
+
itemGroup.forEach(function (it) {
|
|
1437
|
+
state = state.setIn(['scene', 'layers', layerID, 'items', it.id, 'molding'], []);
|
|
1438
|
+
});
|
|
1439
|
+
});
|
|
1439
1440
|
};
|
|
1440
1441
|
|
|
1441
1442
|
// 🔥 Apply to resolved items
|
|
@@ -2218,9 +2218,9 @@ function addItem(sceneData, planData, layer, itemID, catalog, itemsActions) {
|
|
|
2218
2218
|
if (_item4.category === _constants.ITEM_TYPE.CABINET) {
|
|
2219
2219
|
if (!(0, _cabinetWarning.isWarningCabinet)(item)) {
|
|
2220
2220
|
pivot.children.pop();
|
|
2221
|
-
} else {
|
|
2222
|
-
pivot.children.pop();
|
|
2223
2221
|
}
|
|
2222
|
+
} else {
|
|
2223
|
+
pivot.children.pop();
|
|
2224
2224
|
}
|
|
2225
2225
|
}
|
|
2226
2226
|
}
|