kitchen-simulator 4.3.7 → 4.3.9
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/project.js
CHANGED
|
@@ -105,6 +105,9 @@ var Project = /*#__PURE__*/function () {
|
|
|
105
105
|
|
|
106
106
|
// check type of ceilHeight and make it to Number
|
|
107
107
|
if (typeof sceneJSON.layers[layerID].ceilHeight !== 'number') sceneJSON.layers[layerID].ceilHeight = Number(sceneJSON.layers[layerID].ceilHeight);
|
|
108
|
+
|
|
109
|
+
// force change the [isLoadingCabinet] to [false], otherwise 3D view will be stay in loading
|
|
110
|
+
if (sceneJSON.isLoadingCabinet !== false) sceneJSON.isLoadingCabinet = false;
|
|
108
111
|
var newScene = new Scene(sceneJSON);
|
|
109
112
|
state = new State({
|
|
110
113
|
scene: newScene.toJS(),
|
|
@@ -1189,10 +1189,12 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
1189
1189
|
};
|
|
1190
1190
|
var sendInternalEvent = function sendInternalEvent(evtType, evtElement) {
|
|
1191
1191
|
var pointArray = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
1192
|
+
var curLayerId = _this2.props.state.scene.selectedLayer;
|
|
1193
|
+
var curLayer = _this2.props.state.scene.getIn(['layers', curLayerId]);
|
|
1192
1194
|
if (!isEmpty(evtType) && !isEmpty(evtElement)) {
|
|
1193
1195
|
var _state$get, _this2$props$onIntern, _this2$props;
|
|
1194
1196
|
var catalog = (_state$get = state.get('catalog')) === null || _state$get === void 0 ? void 0 : _state$get.toJS();
|
|
1195
|
-
var payload = updatePayloadOfInternalEvent(evtElement,
|
|
1197
|
+
var payload = updatePayloadOfInternalEvent(evtElement, curLayer, catalog, pointArray);
|
|
1196
1198
|
(_this2$props$onIntern = (_this2$props = _this2.props).onInternalEvent) === null || _this2$props$onIntern === void 0 || _this2$props$onIntern.call(_this2$props, {
|
|
1197
1199
|
type: evtType,
|
|
1198
1200
|
value: payload
|
package/es/utils/molding.js
CHANGED
|
@@ -5,6 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
5
5
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
6
6
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
7
7
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
8
|
+
import { Map } from 'immutable';
|
|
8
9
|
import { BASE_CABINET_LAYOUTPOS, BOTTOM_MOLDING_LOCATION, EPSILON, ITEM_TYPE, MIDDLE_MOLDING_LOCATION, MOLDING_LOCATIONS, OVERLAP_INCLUDED, OVERLAP_LINK, OVERLAP_SAME, OVERLAP_SOME, TALL_CABINET_LAYOUTPOS, TOE_KICK_MOLDING, TOP_MOLDING_LOCATION, WALL_CABINET_LAYOUTPOS } from "../constants";
|
|
9
10
|
import * as Three from 'three';
|
|
10
11
|
import { convert } from "./convert-units-lite";
|
|
@@ -975,7 +976,7 @@ export function getMoldingDataOfScene2(layer, catalog, doorStyle) {
|
|
|
975
976
|
MGlines === null || MGlines === void 0 || MGlines.forEach(function (line) {
|
|
976
977
|
return moldingLines.push({
|
|
977
978
|
molding: _objectSpread({}, molding),
|
|
978
|
-
doorStyle: item.doorStyle
|
|
979
|
+
doorStyle: !isEmpty(item.doorStyle) && Map.isMap(item.doorStyle) ? item.doorStyle.toJS() : item.doorStyle,
|
|
979
980
|
line: line,
|
|
980
981
|
z: lineZ,
|
|
981
982
|
parentId: parentId,
|
|
@@ -997,7 +998,7 @@ export function getMoldingDataOfScene2(layer, catalog, doorStyle) {
|
|
|
997
998
|
category: 'molding',
|
|
998
999
|
type: 'cabinet'
|
|
999
1000
|
},
|
|
1000
|
-
doorStyle: item.doorStyle
|
|
1001
|
+
doorStyle: !isEmpty(item.doorStyle) && Map.isMap(item.doorStyle) ? item.doorStyle.toJS() : item.doorStyle,
|
|
1001
1002
|
line: line,
|
|
1002
1003
|
z: z,
|
|
1003
1004
|
parentId: parentId,
|
package/lib/class/project.js
CHANGED
|
@@ -114,6 +114,9 @@ var Project = exports["default"] = /*#__PURE__*/function () {
|
|
|
114
114
|
|
|
115
115
|
// check type of ceilHeight and make it to Number
|
|
116
116
|
if (typeof sceneJSON.layers[layerID].ceilHeight !== 'number') sceneJSON.layers[layerID].ceilHeight = Number(sceneJSON.layers[layerID].ceilHeight);
|
|
117
|
+
|
|
118
|
+
// force change the [isLoadingCabinet] to [false], otherwise 3D view will be stay in loading
|
|
119
|
+
if (sceneJSON.isLoadingCabinet !== false) sceneJSON.isLoadingCabinet = false;
|
|
117
120
|
var newScene = new _models.Scene(sceneJSON);
|
|
118
121
|
state = new _models.State({
|
|
119
122
|
scene: newScene.toJS(),
|
|
@@ -1196,10 +1196,12 @@ var Scene3DViewer = exports["default"] = /*#__PURE__*/function (_React$Component
|
|
|
1196
1196
|
};
|
|
1197
1197
|
var sendInternalEvent = function sendInternalEvent(evtType, evtElement) {
|
|
1198
1198
|
var pointArray = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
1199
|
+
var curLayerId = _this2.props.state.scene.selectedLayer;
|
|
1200
|
+
var curLayer = _this2.props.state.scene.getIn(['layers', curLayerId]);
|
|
1199
1201
|
if (!(0, _helper.isEmpty)(evtType) && !(0, _helper.isEmpty)(evtElement)) {
|
|
1200
1202
|
var _state$get, _this2$props$onIntern, _this2$props;
|
|
1201
1203
|
var catalog = (_state$get = state.get('catalog')) === null || _state$get === void 0 ? void 0 : _state$get.toJS();
|
|
1202
|
-
var payload = (0, _helper.updatePayloadOfInternalEvent)(evtElement,
|
|
1204
|
+
var payload = (0, _helper.updatePayloadOfInternalEvent)(evtElement, curLayer, catalog, pointArray);
|
|
1203
1205
|
(_this2$props$onIntern = (_this2$props = _this2.props).onInternalEvent) === null || _this2$props$onIntern === void 0 || _this2$props$onIntern.call(_this2$props, {
|
|
1204
1206
|
type: evtType,
|
|
1205
1207
|
value: payload
|
package/lib/utils/molding.js
CHANGED
|
@@ -28,6 +28,7 @@ exports.sortItemsByDistance = sortItemsByDistance;
|
|
|
28
28
|
exports.tryMergeMDItem = tryMergeMDItem;
|
|
29
29
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
30
30
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
31
|
+
var _immutable = require("immutable");
|
|
31
32
|
var _constants = require("../constants");
|
|
32
33
|
var Three = _interopRequireWildcard(require("three"));
|
|
33
34
|
var _convertUnitsLite = require("./convert-units-lite");
|
|
@@ -1004,7 +1005,7 @@ function getMoldingDataOfScene2(layer, catalog, doorStyle) {
|
|
|
1004
1005
|
MGlines === null || MGlines === void 0 || MGlines.forEach(function (line) {
|
|
1005
1006
|
return moldingLines.push({
|
|
1006
1007
|
molding: _objectSpread({}, molding),
|
|
1007
|
-
doorStyle:
|
|
1008
|
+
doorStyle: !(0, _helper.isEmpty)(item.doorStyle) && _immutable.Map.isMap(item.doorStyle) ? item.doorStyle.toJS() : item.doorStyle,
|
|
1008
1009
|
line: line,
|
|
1009
1010
|
z: lineZ,
|
|
1010
1011
|
parentId: parentId,
|
|
@@ -1026,7 +1027,7 @@ function getMoldingDataOfScene2(layer, catalog, doorStyle) {
|
|
|
1026
1027
|
category: 'molding',
|
|
1027
1028
|
type: 'cabinet'
|
|
1028
1029
|
},
|
|
1029
|
-
doorStyle:
|
|
1030
|
+
doorStyle: !(0, _helper.isEmpty)(item.doorStyle) && _immutable.Map.isMap(item.doorStyle) ? item.doorStyle.toJS() : item.doorStyle,
|
|
1030
1031
|
line: line,
|
|
1031
1032
|
z: z,
|
|
1032
1033
|
parentId: parentId,
|