kitchen-simulator 11.0.0 → 11.1.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 +5 -1
- package/lib/class/item.js +5 -1
- package/package.json +1 -1
package/es/class/item.js
CHANGED
|
@@ -105,7 +105,7 @@ var Item = /*#__PURE__*/function () {
|
|
|
105
105
|
}
|
|
106
106
|
if (item.category === 'cabinet') {
|
|
107
107
|
if (isDuplication && refItem) {
|
|
108
|
-
var _refItem$ccdf, _refItem$get;
|
|
108
|
+
var _refItem$ccdf, _refItem$get, _refItem$properties, _refItem$properties$g;
|
|
109
109
|
item = item.merge({
|
|
110
110
|
doorStyle: refItem.doorStyle
|
|
111
111
|
});
|
|
@@ -115,6 +115,10 @@ var Item = /*#__PURE__*/function () {
|
|
|
115
115
|
if (!isEmpty(refCcdf)) item = item.merge({
|
|
116
116
|
ccdf: refCcdf
|
|
117
117
|
});
|
|
118
|
+
|
|
119
|
+
// Preserve altitude so wall cabinets don't drop to the floor on duplicate.
|
|
120
|
+
var refAlt = refItem === null || refItem === void 0 || (_refItem$properties = refItem.properties) === null || _refItem$properties === void 0 || (_refItem$properties$g = _refItem$properties.get) === null || _refItem$properties$g === void 0 ? void 0 : _refItem$properties$g.call(_refItem$properties, 'altitude');
|
|
121
|
+
if (refAlt) item = item.setIn(['properties', 'altitude'], refAlt);
|
|
118
122
|
} else {
|
|
119
123
|
var _layer$doorStyle, _temp, _ref, _temp$doorStyles$cds$, _temp2, _temp3, _state5;
|
|
120
124
|
var layer = state.getIn(['scene', 'layers', layerID]);
|
package/lib/class/item.js
CHANGED
|
@@ -112,7 +112,7 @@ var Item = exports["default"] = /*#__PURE__*/function () {
|
|
|
112
112
|
}
|
|
113
113
|
if (item.category === 'cabinet') {
|
|
114
114
|
if (isDuplication && refItem) {
|
|
115
|
-
var _refItem$ccdf, _refItem$get;
|
|
115
|
+
var _refItem$ccdf, _refItem$get, _refItem$properties, _refItem$properties$g;
|
|
116
116
|
item = item.merge({
|
|
117
117
|
doorStyle: refItem.doorStyle
|
|
118
118
|
});
|
|
@@ -122,6 +122,10 @@ var Item = exports["default"] = /*#__PURE__*/function () {
|
|
|
122
122
|
if (!(0, _utils.isEmpty)(refCcdf)) item = item.merge({
|
|
123
123
|
ccdf: refCcdf
|
|
124
124
|
});
|
|
125
|
+
|
|
126
|
+
// Preserve altitude so wall cabinets don't drop to the floor on duplicate.
|
|
127
|
+
var refAlt = refItem === null || refItem === void 0 || (_refItem$properties = refItem.properties) === null || _refItem$properties === void 0 || (_refItem$properties$g = _refItem$properties.get) === null || _refItem$properties$g === void 0 ? void 0 : _refItem$properties$g.call(_refItem$properties, 'altitude');
|
|
128
|
+
if (refAlt) item = item.setIn(['properties', 'altitude'], refAlt);
|
|
125
129
|
} else {
|
|
126
130
|
var _layer$doorStyle, _temp, _ref, _temp$doorStyles$cds$, _temp2, _temp3, _state5;
|
|
127
131
|
var layer = state.getIn(['scene', 'layers', layerID]);
|