kitchen-simulator 2.0.56 → 2.0.60
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/catalog/holes/window-clear/planner-element.js +2 -2
- package/es/class/item.js +22 -15
- package/es/components/viewer2d/item.js +34 -29
- package/es/components/viewer2d/rulerDist.js +39 -56
- package/es/components/viewer2d/viewer2d.js +5 -8
- package/es/components/viewer3d/front3D.js +3 -2
- package/es/constants.js +11 -1
- package/es/devLiteRenderer.js +84 -63
- package/es/plugins/SVGLoader.js +7 -5
- package/es/utils/isolate-event-handler.js +150 -88
- package/lib/catalog/holes/window-clear/planner-element.js +2 -2
- package/lib/class/item.js +22 -15
- package/lib/components/viewer2d/item.js +34 -29
- package/lib/components/viewer2d/rulerDist.js +39 -56
- package/lib/components/viewer2d/viewer2d.js +5 -8
- package/lib/components/viewer3d/front3D.js +3 -2
- package/lib/constants.js +15 -5
- package/lib/devLiteRenderer.js +83 -62
- package/lib/plugins/SVGLoader.js +7 -5
- package/lib/utils/isolate-event-handler.js +149 -87
- package/package.json +1 -1
|
@@ -73,63 +73,46 @@ function RulerDist(_ref) {
|
|
|
73
73
|
textRotation = 180;
|
|
74
74
|
ay = 5;
|
|
75
75
|
}
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
76
|
+
if (distanceText > 0) {
|
|
77
|
+
if (distanceText < 28) {
|
|
78
|
+
return /*#__PURE__*/_react["default"].createElement("g", {
|
|
79
|
+
transform: transform
|
|
80
|
+
}, /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("text", {
|
|
81
|
+
x: "0",
|
|
82
|
+
y: "0",
|
|
83
|
+
transform: "translate(".concat(length / 2, ",").concat(ay, ") scale(1, -1) rotate(").concat(textRotation, ")"),
|
|
84
|
+
style: STYLE_TEXT
|
|
85
|
+
}, Math.round((0, _convertUnitsLite.convert)(distanceText).from('in').to(layer.unit) * 100) / 100, layer.unit === 'in' ? '"' : layer.unit)));
|
|
86
|
+
} else {
|
|
87
|
+
return /*#__PURE__*/_react["default"].createElement("g", {
|
|
88
|
+
transform: transform
|
|
89
|
+
}, /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("text", {
|
|
90
|
+
x: "0",
|
|
91
|
+
y: "0",
|
|
92
|
+
transform: "translate(".concat(length / 2, ",").concat(ay, ") scale(1, -1) rotate(").concat(textRotation, ")"),
|
|
93
|
+
style: STYLE_TEXT
|
|
94
|
+
}, Math.round((0, _convertUnitsLite.convert)(distanceText).from('in').to(layer.unit) * 100) / 100, layer.unit === 'in' ? '"' : layer.unit)), /*#__PURE__*/_react["default"].createElement("line", {
|
|
95
|
+
x1: "2",
|
|
96
|
+
y1: "0",
|
|
97
|
+
x2: (length - textLength) / 2 < 0 ? 0 : (length - textLength) / 2,
|
|
98
|
+
y2: "0",
|
|
99
|
+
style: STYLE
|
|
100
|
+
}), /*#__PURE__*/_react["default"].createElement("polygon", {
|
|
101
|
+
points: "1, 0, 4.5, -2, 4.5, 2 ",
|
|
102
|
+
style: STYLE
|
|
103
|
+
}), /*#__PURE__*/_react["default"].createElement("line", {
|
|
104
|
+
x1: (length + textLength) / 2 < 0 ? 0 : (length + textLength) / 2 < length ? (length + textLength) / 2 : length,
|
|
105
|
+
y1: "0",
|
|
106
|
+
x2: length,
|
|
107
|
+
y2: "0",
|
|
108
|
+
style: STYLE
|
|
109
|
+
}), /*#__PURE__*/_react["default"].createElement("polygon", {
|
|
110
|
+
points: "".concat(length - 1, ", 0, ").concat(length - 4.5, ", 2, ").concat(length - 4.5, ", -2"),
|
|
111
|
+
style: STYLE
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
106
114
|
} else {
|
|
107
|
-
return
|
|
108
|
-
transform: transform
|
|
109
|
-
}, /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("text", {
|
|
110
|
-
x: "0",
|
|
111
|
-
y: "0",
|
|
112
|
-
transform: "translate(".concat(length / 2, ",").concat(ay, ") scale(1, -1) rotate(").concat(textRotation, ")"),
|
|
113
|
-
style: STYLE_TEXT
|
|
114
|
-
}, Math.round((0, _convertUnitsLite.convert)(distanceText).from('in').to(layer.unit) * 100) / 100, layer.unit === 'in' ? '"' : layer.unit)), /*#__PURE__*/_react["default"].createElement("line", {
|
|
115
|
-
x1: "2",
|
|
116
|
-
y1: "0",
|
|
117
|
-
x2: (length - textLength) / 2 < 0 ? 0 : (length - textLength) / 2,
|
|
118
|
-
y2: "0",
|
|
119
|
-
style: STYLE
|
|
120
|
-
}), /*#__PURE__*/_react["default"].createElement("polygon", {
|
|
121
|
-
points: "1, 0, 4.5, -2, 4.5, 2 ",
|
|
122
|
-
style: STYLE
|
|
123
|
-
}), /*#__PURE__*/_react["default"].createElement("line", {
|
|
124
|
-
x1: (length + textLength) / 2 < 0 ? 0 : (length + textLength) / 2 < length ? (length + textLength) / 2 : length,
|
|
125
|
-
y1: "0",
|
|
126
|
-
x2: length,
|
|
127
|
-
y2: "0",
|
|
128
|
-
style: STYLE
|
|
129
|
-
}), /*#__PURE__*/_react["default"].createElement("polygon", {
|
|
130
|
-
points: "".concat(length - 1, ", 0, ").concat(length - 4.5, ", 2, ").concat(length - 4.5, ", -2"),
|
|
131
|
-
style: STYLE
|
|
132
|
-
}));
|
|
115
|
+
return null;
|
|
133
116
|
}
|
|
134
117
|
}
|
|
135
118
|
RulerDist.propTypes = {
|
|
@@ -1252,12 +1252,9 @@ function Viewer2D(_ref, _ref2) {
|
|
|
1252
1252
|
break;
|
|
1253
1253
|
}
|
|
1254
1254
|
if (internalType) {
|
|
1255
|
-
var
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
_currentObject = state.getIn(['scene', 'layers', layerID, elementData === null || elementData === void 0 ? void 0 : elementData.prototype, elementData === null || elementData === void 0 ? void 0 : elementData.id]);
|
|
1259
|
-
if (internalType === _constants.INTERNAL_EVENT_SELECT_ELEMENT && ((_currentObject2 = _currentObject) === null || _currentObject2 === void 0 ? void 0 : _currentObject2.prototype) === 'items' && draggingDistance > constants.EPSILON) internalType = _constants.INTERNAL_EVENT_DRAG_ELEMENT;
|
|
1260
|
-
} else if (draggingDistance > constants.EPSILON) {
|
|
1255
|
+
var _currentObject2;
|
|
1256
|
+
var _currentObject = state.getIn(['scene', 'layers', layerID, elementData === null || elementData === void 0 ? void 0 : elementData.prototype, elementData === null || elementData === void 0 ? void 0 : elementData.id]);
|
|
1257
|
+
if (internalType === _constants.INTERNAL_EVENT_SELECT_ELEMENT && ((_currentObject2 = _currentObject) === null || _currentObject2 === void 0 ? void 0 : _currentObject2.prototype) === 'items' && draggingDistance > constants.EPSILON) internalType = _constants.INTERNAL_EVENT_DRAG_ELEMENT;else if (internalType === _constants.INTERNAL_EVENT_DRAW_ELEMENT || draggingDistance > constants.EPSILON) {
|
|
1261
1258
|
var elementID = state.getIn(['scene', 'layers', layerID, 'selected', elementPrototype]).first();
|
|
1262
1259
|
_currentObject = state.getIn(['scene', 'layers', layerID, elementPrototype, elementID]);
|
|
1263
1260
|
}
|
|
@@ -1298,10 +1295,10 @@ function Viewer2D(_ref, _ref2) {
|
|
|
1298
1295
|
if (_zoomValue > constants.MAX_ZOOM_IN_SCALE) return;
|
|
1299
1296
|
if (_zoomValue < 0 || Number.isNaN(_zoomValue)) return;
|
|
1300
1297
|
if (rulerEdit !== null && value.startX && value.startY || value.lastAction === 'zoom') {
|
|
1301
|
-
var _rulerEdit = document.getElementById('ruler_numberInput'),
|
|
1298
|
+
var _rulerEdit = document.getElementById('ruler_numberInput') && document.getElementById('ruler_numberInput'),
|
|
1302
1299
|
_rect;
|
|
1303
1300
|
if (rulerEditID !== null) {
|
|
1304
|
-
_rect = document.getElementById(rulerEditID);
|
|
1301
|
+
_rect = document.getElementById(rulerEditID) && document.getElementById(rulerEditID);
|
|
1305
1302
|
}
|
|
1306
1303
|
var bbox;
|
|
1307
1304
|
if (_rect && _rulerEdit) {
|
|
@@ -10,6 +10,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _viewer3d = _interopRequireDefault(require("./viewer3d"));
|
|
12
12
|
var _state3D = _interopRequireDefault(require("./ruler-utils/state3D"));
|
|
13
|
+
var _utils = require("../viewer2d/utils");
|
|
13
14
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
14
15
|
var k = 0;
|
|
15
16
|
function Front3D(_ref, _ref2) {
|
|
@@ -35,9 +36,9 @@ function Front3D(_ref, _ref2) {
|
|
|
35
36
|
setToolbar('');
|
|
36
37
|
};
|
|
37
38
|
(0, _react.useEffect)(function () {
|
|
38
|
-
document.getElementById('front').addEventListener('mouseup', mouseUpEvent);
|
|
39
|
+
if (!(0, _utils.isEmpty)(document.getElementById('front'))) document.getElementById('front').addEventListener('mouseup', mouseUpEvent);
|
|
39
40
|
return function () {
|
|
40
|
-
document.getElementById('front').removeEventListener('mouseup', mouseUpEvent);
|
|
41
|
+
if (!(0, _utils.isEmpty)(document.getElementById('front'))) document.getElementById('front').removeEventListener('mouseup', mouseUpEvent);
|
|
41
42
|
};
|
|
42
43
|
}, []);
|
|
43
44
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("svg", {
|
package/lib/constants.js
CHANGED
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.END_ROTATING_ITEM_3D = exports.END_ROTATING_ITEM = exports.END_LOADING = exports.END_FITTING_IMAGE = exports.END_DRAWING_LINE = exports.END_DRAWING_ITEM = exports.END_DRAWING_HOLE_3D = exports.END_DRAWING_HOLE = exports.END_DRAGGING_VERTEX = exports.END_DRAGGING_LINE = exports.END_DRAGGING_ITEM_3D = exports.END_DRAGGING_ITEM = exports.END_DRAGGING_HOLE_3D = exports.END_DRAGGING_HOLE = exports.END_CREATING_HOLE = exports.END_CREATING_CABINET = exports.ELEVATION_VIEW_TITLE = exports.ELEVATION_VIEW_RIGHT = exports.ELEVATION_VIEW_LEFT = exports.ELEVATION_VIEW_KEYWORD = exports.ELEVATION_VIEW_FRONT = exports.ELEVATION_VIEW_BACK = exports.ELEVATION_VIEW = exports.ELEMENT_VERTEX = exports.ELEMENT_LINE = exports.ELEMENT_ITEM = exports.ELEMENT_HOLE = exports.ELEMENT_AREA = exports.EDIT_WIDTH = exports.EDIT = exports.DUPLICATE_SELECTED = exports.DISTANCE_MEASUREMENT_LINE_COLOR = exports.DISTANCE_EPSILON = exports.DIFFERENT_VALUES_PATH_LENGTH = exports.DELTA = exports.DEFAULT_FONT_FAMILY = exports.DECIMAL_PLACES_3 = exports.DECIMAL_PLACES_2 = exports.DASH_LINE_COLOR = exports.CREATE_ROOM_WITH_SHAPE = exports.COPY_PROPERTIES = exports.CLIENTS_NAME = exports.CHANGE_WINDOW_DOOR_MEASURE = exports.CHANGE_WALL_LENGTH_MEASURE = exports.CHANGE_WALL_CABINET_MEASURE = exports.CHANGE_CATALOG_PAGE = exports.CHANGE_BASE_CABINET_MEASURE = exports.CEIL_UNITS_LENGTH = exports.BROWN_COLOR = exports.BOTTOM_MOLDING_LOCATION = exports.BOTTOM = exports.BG_COLOR_OVERLAY = exports.BG_COLOR_HOVER = exports.BG_COLOR_1 = exports.BG_COLOR_0 = exports.BEGIN_UPLOADING_IMAGE = exports.BEGIN_ROTATING_ITEM_3D = exports.BEGIN_ROTATING_ITEM = exports.BEGIN_FITTING_IMAGE = exports.BEGIN_DRAWING_LINE = exports.BEGIN_DRAGGING_VERTEX = exports.BEGIN_DRAGGING_LINE = exports.BEGIN_DRAGGING_ITEM_3D = exports.BEGIN_DRAGGING_ITEM = exports.BEGIN_DRAGGING_HOLE_3D = exports.BEGIN_DRAGGING_HOLE = exports.BASE_ITEM_MEASUREMENT_LINE_COLOR = exports.BASE_CABINET_LAYOUTPOS = exports.BACK_DIST_ANG = exports.ATT_VERTEXT_TWO = exports.ATT_VERTEXT_ONE = exports.ATT_LINE_LENGTH = exports.ATT_ITEM_ROTATION = exports.ATT_ITEM_POS = exports.ATT_HOLE_OFFSET_B = exports.ATT_HOLE_OFFSET_A = exports.ARROW_TEXT_FORECOLOR = exports.ARROW_TEXT_FONTFACE = exports.ARROW_TEXT_BACKCOLOR = exports.ARROW_COLOR = exports.ARRAY_ELEVATION_VIEW_MODES = exports.ARRAY_3D_MODES = exports.AREA_ACTIONS = exports.API_SERVER_URL = exports.ANIMATE_STEP_MIN = exports.ANIMATE_STEP_MAX = exports.ANIMATE_OBJECT_OPEN_DOOR_ROTATION_UNIT = exports.ANIMATE_OBJECT = exports.ALTERATE_STATE = exports.ADD_VERTICAL_GUIDE = exports.ADD_TO_GROUP = exports.ADD_LAYER = exports.ADD_HORIZONTAL_GUIDE = exports.ADD_GROUP_FROM_SELECTED = exports.ADD_GROUP = exports.ADD_ELEMENT_TO_CATALOG = exports.ADD_CIRCULAR_GUIDE = exports.ADD_CABINETS = exports.ADD_APPLIANCES = exports.ACCENT_COLOR = void 0;
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.ZOOM_VARIABLE = exports.WARRANTY_VIEW = exports.WARRANTY_SUPPORT = exports.WARNING_MESSAGE = exports.WALL_ITEM_MEASUREMENT_LINE_COLOR = exports.WALL_CABINET_LAYOUTPOS = exports.VIEWER3D_ACTIONS = exports.VIEWER2D_ACTIONS = exports.VERTEX_ACTIONS = exports.VALIDATE_ITEM_POSTIONS = exports.USER_ACTIONS = exports.UPDATE_ZOOM_SCALE = exports.UPDATE_ROTATING_ITEM_CHANGED = exports.UPDATE_ROTATING_ITEM = exports.UPDATE_ROTATING = exports.UPDATE_POPUP_OPEN = exports.UPDATE_MOVING_STATE = exports.UPDATE_MOUSE_COORDS = exports.UPDATE_MOLDING = exports.UPDATE_ITEM_POSITION = void 0;
|
|
7
|
+
exports.MODE_FITTING_IMAGE = exports.MODE_ELEVATION_VIEW = exports.MODE_DRAWING_LINE = exports.MODE_DRAWING_ITEM_3D = exports.MODE_DRAWING_ITEM = exports.MODE_DRAWING_HOLE_3D = exports.MODE_DRAWING_HOLE = exports.MODE_DRAGGING_VERTEX = exports.MODE_DRAGGING_LINE = exports.MODE_DRAGGING_ITEM_3D = exports.MODE_DRAGGING_ITEM = exports.MODE_DRAGGING_HOLE_3D = exports.MODE_DRAGGING_HOLE = exports.MODE_CONFIGURING_PROJECT = exports.MODE_BACK_ELEVATION_VIEW = exports.MODE_3D_VIEW = exports.MODE_3D_FIRST_PERSON = exports.MODE_2D_ZOOM_OUT = exports.MODE_2D_ZOOM_IN = exports.MODE_2D_PAN = exports.MODE = exports.MIN_ANGLE_DISALLOW_DRAW_WALL = exports.MIDDLE_MOLDING_LOCATION = exports.MEPSILON = exports.MAX_ZOOM_IN_SCALE = exports.MAX_ANGLE_SCALE = exports.MAKE_FLOOR_PLAN = exports.LOGOUT = exports.LOGIN_SUCCESS = exports.LOGIN_ERROR = exports.LOCAL_STORAGE_TOKEN_VALUE = exports.LOCAL_STORAGE_TOKEN_NAME = exports.LOCAL_STORAGE_ORIGINAL_TOKEN = exports.LOCAL_STORAGE_CUSTOMER_INFO = exports.LOCAL_STORAGE_CART_ACTION = exports.LOAD_PROJECT = exports.LIST_QUANTITIES = exports.LIST_PARTS = exports.LINE_THICKNESS = exports.LINE_ACTIONS = exports.LEFT_DIST_ANG = exports.LEFT = exports.LABEL_COLOR = exports.KITCHEN_KONFIGURATOR = exports.KEYBOARD_BUTTON_CODE = exports.ITEM_TYPE = exports.ITEM_MOVE_UP = exports.ITEMS_ACTIONS = exports.INVERT = exports.INTERNAL_EVENT_UNSELECT_ALL = exports.INTERNAL_EVENT_SYNC_SCENE = exports.INTERNAL_EVENT_SELECT_ELEMENT = exports.INTERNAL_EVENT_ROTATE_ELEMENT = exports.INTERNAL_EVENT_REPLACE_CABINET = exports.INTERNAL_EVENT_ITEMS_CATALOG = exports.INTERNAL_EVENT_DRAW_ELEMENT = exports.INTERNAL_EVENT_DRAG_ELEMENT = exports.INSTALLATION_TYPE_SKU_SUFFIX = exports.INSTALLATION_TYPE_NAME = exports.INSTALLATION_SUFFIX_TYPE = exports.INIT_CATALOG = exports.HOLE_NAMES = exports.HOLE_ACTIONS = exports.HDR_URLS = exports.HAS_LOADINGBAR = exports.GROUP_TRANSLATE = exports.GROUP_ROTATE = exports.GROUP_ACTIONS = exports.GO_BACK_TO_CATALOG_PAGE = exports.FRONT_DIST_ANG = exports.FINISHING_TYPE = exports.FINISHING_TOUCH = exports.EXTERNAL_EVENT_ZOOM_OUT = exports.EXTERNAL_EVENT_ZOOM_IN = exports.EXTERNAL_EVENT_UPDATE_PROPERTY = exports.EXTERNAL_EVENT_UPDATE_ATTRIBUTE = exports.EXTERNAL_EVENT_UNDO = exports.EXTERNAL_EVENT_TOGGLE_TO_ELEVATION = exports.EXTERNAL_EVENT_TOGGLE_TO_3D = exports.EXTERNAL_EVENT_TOGGLE_TO_2D = exports.EXTERNAL_EVENT_SYNC_SCENE = exports.EXTERNAL_EVENT_SET_MOLDING = exports.EXTERNAL_EVENT_SET_FINISHING = exports.EXTERNAL_EVENT_REPLACE_CABINET = exports.EXTERNAL_EVENT_REDO = exports.EXTERNAL_EVENT_PROJECT_SETTING = exports.EXTERNAL_EVENT_NEW_PROJECT = exports.EXTERNAL_EVENT_MOVE_PAN = exports.EXTERNAL_EVENT_LOAD_PROJECT = exports.EXTERNAL_EVENT_DUPLICATE_ELEMENT = exports.EXTERNAL_EVENT_DELETE_ELEMENT = exports.EXTERNAL_EVENT_CHANGE_DOORSTYLE = exports.EXTERNAL_EVENT_CENTERING_2D = exports.EXTERNAL_EVENT_ADD_WALL = exports.EXTERNAL_EVENT_ADD_ROOM_SHAPE = exports.EXTERNAL_EVENT_ADD_ITEM = exports.EXTERNAL_EVENT_ADD_HOLE = exports.ERROR_DATABASE = exports.EPSILON = exports.END_UPLOADING_IMAGE = void 0;
|
|
8
|
+
exports.SET_GROUP_BARYCENTER = exports.SET_GROUP_ATTRIBUTES = exports.SET_FLOOR_STYLES = exports.SET_DOOR_STYLE = exports.SET_DOOR_HANDLE = exports.SET_DISTANT = exports.SET_COUNTER_TOP = exports.SET_BACKSPLASH_VISIBLE = exports.SET_BACKSPLASH = exports.SET_APPLIANCE_MATERIAL = exports.SELECT_TOOL_ZOOM_OUT = exports.SELECT_TOOL_ZOOM_IN = exports.SELECT_TOOL_UPLOAD_IMAGE = exports.SELECT_TOOL_PAN = exports.SELECT_TOOL_EDIT = exports.SELECT_TOOL_DRAWING_LINE = exports.SELECT_TOOL_DRAWING_ITEM_3D = exports.SELECT_TOOL_DRAWING_ITEM = exports.SELECT_TOOL_DRAWING_HOLE_3D = exports.SELECT_TOOL_DRAWING_HOLE = exports.SELECT_TOOL_3D_VIEW = exports.SELECT_TOOL_3D_FIRST_PERSON = exports.SELECT_LINE = exports.SELECT_LAYER = exports.SELECT_ITEM = exports.SELECT_HOLE = exports.SELECT_GROUP = exports.SELECT_DOOR_STYLE = exports.SELECT_AREA = exports.SELECT_ALL = exports.SELECTALL = exports.SECONDARY_PURPLE_COLOR = exports.SECONDARY_BLUE_COLOR = exports.SCENE_ACTIONS = exports.SAVE_PROJECT = exports.SAVE_DESIGN = exports.ROOM_SHAPE_TYPE = exports.ROOM_SHAPE_MEASUREMENT_LINE_COLOR = exports.ROOM_ELEMENT_MEASUREMENT_LINE_COLOR = exports.ROLLBACK = exports.RIGHT_DIST_ANG = exports.RIGHT = exports.REVIEW_AND_QUOTE = exports.REQUEST_ASSISTANCE = exports.REPLACE_SUBMODULE = exports.REPLACE_ITEM = exports.REMOVE_VERTICAL_GUIDE = exports.REMOVE_REPLACE_SUBMODULE = exports.REMOVE_LINEAR = exports.REMOVE_LAYER = exports.REMOVE_HORIZONTAL_GUIDE = exports.REMOVE_GROUP_AND_DELETE_ELEMENTS = exports.REMOVE_GROUP = exports.REMOVE_FROM_GROUP = exports.REMOVE_DRAWING_SUPPORT = exports.REMOVE_CIRCULAR_GUIDE = exports.REMOVE = exports.REDO = exports.RECREATE = exports.PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY = exports.PROP_RESIZE_WIDTH = exports.PROP_RESIZE_HEIGHT = exports.PROP_RESIZE_DEPTH = exports.PROP_OPEN_DOORS = exports.PROP_FLIP_DOOR_HANDLE = exports.PROP_ALTITUDE = exports.PROJECT_SETTING_OPTION = exports.PROJECT_RE_NAME = exports.PROJECT_NAME_LENGTH_LIMIT = exports.PROJECT_ACTIONS = exports.PRODUCT = exports.PRIMARY_GREEN_COLOR = exports.PASTE_PROPERTIES = exports.OVERLAP_SOME = exports.OVERLAP_SAME = exports.OVERLAP_NONE = exports.OVERLAP_LINK = exports.OVERLAP_INCLUDED = exports.OPEN_PROJECT_CONFIGURATOR = exports.OPEN_CATALOG = exports.OBJTYPE_MESH = exports.OBJTYPE_GROUP = exports.NO_DATA_DATABASE = exports.NEW_PROJECT_BTN = exports.NEW_PROJECT = exports.NEW_DESIGN = exports.MOVE_COMPONENT = exports.MOLDING_LOCATIONS = exports.MODE_WAITING_DRAWING_LINE = exports.MODE_VIEWING_CATALOG = exports.MODE_UPLOADING_IMAGE = exports.MODE_SNAPPING = exports.MODE_ROTATING_ITEM_3D = exports.MODE_ROTATING_ITEM = exports.MODE_RIGHT_ELEVATION_VIEW = exports.MODE_LEFT_ELEVATION_VIEW = exports.MODE_IDLE_3D = exports.MODE_IDLE = exports.MODE_FRONT_VIEW = exports.MODE_FRONT_ELEVATION_VIEW = void 0;
|
|
9
|
+
exports.UPDATE_DRAWING_HOLE_3D = exports.UPDATE_DRAWING_HOLE = exports.UPDATE_DRAGGING_VERTEX = exports.UPDATE_DRAGGING_LINE = exports.UPDATE_DRAGGING_ITEM_CHANGED = exports.UPDATE_DRAGGING_ITEM_3DY = exports.UPDATE_DRAGGING_ITEM_3DX = exports.UPDATE_DRAGGING_ITEM = exports.UPDATE_DRAGGING_HOLE_RULER_CHANGED = exports.UPDATE_DRAGGING_HOLE_CHANGED = exports.UPDATE_DRAGGING_HOLE_3D = exports.UPDATE_DRAGGING_HOLE = exports.UPDATE_CEIL_HEIGHT_UNIT = exports.UPDATE_CEIL_HEIGHT = exports.UPDATE_3D_CEIL_HEIGHT_UNIT = exports.UPDATE_3D_CEIL_HEIGHT = exports.UPDATE_2D_CAMERA = exports.UNSELECT_GROUP = exports.UNSELECT_ALL = exports.UNIT_MILLIMETER = exports.UNIT_MILE = exports.UNIT_METER = exports.UNIT_INCH = exports.UNIT_FOOT = exports.UNIT_CENTIMETER = exports.UNIT_ANGLE = exports.UNITS_LENGTH = exports.UNDO = exports.UNCREATE = exports.TWO_D_FLOOR_PLAN = exports.TOP_MOLDING_LOCATION = exports.TOP = exports.TOGGLE_SNAP = exports.TOGGLE_LOADING_CABINET = exports.TOE_KICK_MOLDING = exports.TITLE_SMALL_COLOR = exports.TITLE_COLOR = exports.THROW_WARNING = exports.THROW_ERROR = exports.TEXT_COLOR_NEUTRAL_7 = exports.TEXT_COLOR_NEUTRAL_6 = exports.TEXT_COLOR_NEUTRAL_5 = exports.TEXT_COLOR_NEUTRAL_4 = exports.TEXT_COLOR_NEUTRAL_3 = exports.TEXT_COLOR_NEUTRAL_2 = exports.TEXT_COLOR_NEUTRAL_1 = exports.TEXT_COLOR_NEUTRAL_0 = exports.TEXT_COLOR = exports.TECHNICAL_VIEW = exports.TALL_CABINET_LAYOUTPOS = exports.TAKE_PICTURE = exports.SUBTOTAL = exports.SUBMIT_REQUEST_ASSIST = exports.SUBMIT_DESIGN = exports.SUBMIT_ADD_CART = exports.STORE_DIST_ARRAY = exports.STOP_DRAWING_LINE = exports.STEP_CABINET_CHOOSE_PRODUCT = exports.STATUS_WARNING_LIGHT_COLOR = exports.STATUS_WARNING_COLOR = exports.STATUS_POSITIVE_LIGHT_COLOR = exports.STATUS_POSITIVE_COLOR = exports.STATUS_OVERDUE_LIGHT_COLOR = exports.STATUS_OVERDUE_COLOR = exports.STATUS_NEGATIVE_LIGHT_COLOR = exports.STATUS_NEGATIVE_COLOR = exports.STATUS_INFO_LIGHT_COLOR = exports.STATUS_INFO_COLOR = exports.SHIFT2DON = exports.SHIFT2DOFF = exports.SHAPE_SVG_WIDTH = exports.SHAPE_SVG_PADDING = exports.SHAPE_SVG_DEPTH = exports.SHADE_LIGHT_PURPLE_COLOR = exports.SHADE_LIGHT_GREEN_COLOR = exports.SHADE_LIGHT_BLUE_COLOR = exports.SHADE_DARK_PURPLE_COLOR = exports.SHADE_DARK_GREEN_COLOR = exports.SHADE_DARK_BLUE_COLOR = exports.SET_WALL_COLOR = exports.SET_USER_DATA = exports.SET_STATE_PROPERTIES = exports.SET_ROTATE_STATUS = exports.SET_RELATED_LINE = exports.SET_PROPERTIES = exports.SET_PROJECT_PROPERTIES = exports.SET_PROJECT_ID = exports.SET_MOVE_STATUS = exports.SET_MOLDING = exports.SET_MODELLING = exports.SET_MODE = exports.SET_LINES_ATTRIBUTES = exports.SET_LAYER_PROPERTIES = exports.SET_ITEMS_ATTRIBUTES = exports.SET_IS_HELP = exports.SET_IS_CABINET_DRAWING = exports.SET_INITIAL_DOOR_STYLE = exports.SET_HOLES_ATTRIBUTES = exports.SET_HANDLE_MATERIAL = exports.SET_GROUP_PROPERTIES = void 0;
|
|
10
|
+
exports.ZOOM_VARIABLE = exports.WARRANTY_VIEW = exports.WARRANTY_SUPPORT = exports.WARNING_MESSAGE = exports.WALL_ITEM_MEASUREMENT_LINE_COLOR = exports.WALL_CABINET_LAYOUTPOS = exports.VIEWER3D_ACTIONS = exports.VIEWER2D_ACTIONS = exports.VERTEX_ACTIONS = exports.VALIDATE_ITEM_POSTIONS = exports.USER_ACTIONS = exports.UPDATE_ZOOM_SCALE = exports.UPDATE_ROTATING_ITEM_CHANGED = exports.UPDATE_ROTATING_ITEM = exports.UPDATE_ROTATING = exports.UPDATE_POPUP_OPEN = exports.UPDATE_MOVING_STATE = exports.UPDATE_MOUSE_COORDS = exports.UPDATE_MOLDING = exports.UPDATE_ITEM_POSITION = exports.UPDATE_DRAWING_LINE = exports.UPDATE_DRAWING_ITEM = void 0;
|
|
11
11
|
//API server
|
|
12
12
|
// export const API_SERVER = 'http://localhost:3000/';
|
|
13
13
|
// ACTIONS project
|
|
@@ -663,7 +663,7 @@ var PROJECT_SETTING_OPTION = exports.PROJECT_SETTING_OPTION = {
|
|
|
663
663
|
CHANGE_WINDOW_DOOR_MEASURE: CHANGE_WINDOW_DOOR_MEASURE
|
|
664
664
|
};
|
|
665
665
|
var HOLE_NAMES = exports.HOLE_NAMES = {
|
|
666
|
-
WINDOW_CLEAR: 'Window',
|
|
666
|
+
WINDOW_CLEAR: 'Clear Window',
|
|
667
667
|
WINDOW_CROSS: 'Cross Window',
|
|
668
668
|
WINDOW_DOUBLE_HUNG: 'Double Hung Window',
|
|
669
669
|
WINDOW_VERTICAL: 'window-vertical',
|
|
@@ -708,6 +708,15 @@ var PROP_ALTITUDE = exports.PROP_ALTITUDE = 'altitude';
|
|
|
708
708
|
var PROP_RESIZE_WIDTH = exports.PROP_RESIZE_WIDTH = 'width';
|
|
709
709
|
var PROP_RESIZE_HEIGHT = exports.PROP_RESIZE_HEIGHT = 'height';
|
|
710
710
|
var PROP_RESIZE_DEPTH = exports.PROP_RESIZE_DEPTH = 'depth';
|
|
711
|
+
|
|
712
|
+
// finishing typs
|
|
713
|
+
var FINISHING_TYPE = exports.FINISHING_TYPE = {
|
|
714
|
+
COUNTER_TOP: 'counterTop',
|
|
715
|
+
DOOR_HANDLE: 'doorHandle',
|
|
716
|
+
WALL_COLOR: 'wallColor',
|
|
717
|
+
FLOOR_STYLE: 'floorStyle',
|
|
718
|
+
BACKSPLASH: 'backsplash'
|
|
719
|
+
};
|
|
711
720
|
var MAX_ZOOM_IN_SCALE = exports.MAX_ZOOM_IN_SCALE = Infinity;
|
|
712
721
|
|
|
713
722
|
// external event type
|
|
@@ -739,6 +748,7 @@ var EXTERNAL_EVENT_DELETE_ELEMENT = exports.EXTERNAL_EVENT_DELETE_ELEMENT = 'EXT
|
|
|
739
748
|
var EXTERNAL_EVENT_UPDATE_ATTRIBUTE = exports.EXTERNAL_EVENT_UPDATE_ATTRIBUTE = 'EXTERNAL_EVENT_UPDATE_ATTRIBUTE'; // update the element's attributes (distance, rotation...) in the property window
|
|
740
749
|
var EXTERNAL_EVENT_UPDATE_PROPERTY = exports.EXTERNAL_EVENT_UPDATE_PROPERTY = 'EXTERNAL_EVENT_UPDATE_PROPERTY'; // update the element's property (flip_doorhandle, open_doors...) in the property window
|
|
741
750
|
var EXTERNAL_EVENT_REPLACE_CABINET = exports.EXTERNAL_EVENT_REPLACE_CABINET = 'EXTERNAL_EVENT_REPLACE_CABINET';
|
|
751
|
+
var EXTERNAL_EVENT_SET_FINISHING = exports.EXTERNAL_EVENT_SET_FINISHING = 'EXTERNAL_EVENT_SET_FINISHING'; // set finishing(wallColor, floorStyle, doorHandle, backsplash, counterTop)
|
|
742
752
|
|
|
743
753
|
// internal event type
|
|
744
754
|
var INTERNAL_EVENT_UNSELECT_ALL = exports.INTERNAL_EVENT_UNSELECT_ALL = 'INTERNAL_EVENT_UNSELECT_ALL';
|
package/lib/devLiteRenderer.js
CHANGED
|
@@ -256,70 +256,70 @@ function WorkSpace(props) {
|
|
|
256
256
|
doorStyles: {
|
|
257
257
|
base: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
258
258
|
counttop: 'https://media.test.diydesignspace.com/uploads/CountTop/202105074107_5/texture/Unique_Calcatta_texture.jpg',
|
|
259
|
-
interior: '
|
|
259
|
+
interior: 'https://media.test.diydesignspace.com/uploads/assets/default/maple.jpg',
|
|
260
260
|
base_door_1: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
261
261
|
base_fixed_drawer_door_1: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
262
262
|
base_drawer_1: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
263
263
|
base_drawer_door_1: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
264
|
-
door_handle_1: '
|
|
265
|
-
fixed_drawer_door_handle_1: '
|
|
266
|
-
drawer_door_handle_1: '
|
|
264
|
+
door_handle_1: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
265
|
+
fixed_drawer_door_handle_1: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
266
|
+
drawer_door_handle_1: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
267
267
|
base_door_2: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
268
268
|
base_fixed_drawer_door_2: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
269
269
|
base_drawer_2: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
270
270
|
base_drawer_door_2: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
271
|
-
door_handle_2: '
|
|
272
|
-
fixed_drawer_door_handle_2: '
|
|
273
|
-
drawer_door_handle_2: '
|
|
271
|
+
door_handle_2: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
272
|
+
fixed_drawer_door_handle_2: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
273
|
+
drawer_door_handle_2: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
274
274
|
base_door_3: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
275
275
|
base_fixed_drawer_door_3: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
276
276
|
base_drawer_3: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
277
277
|
base_drawer_door_3: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
278
|
-
door_handle_3: '
|
|
279
|
-
fixed_drawer_door_handle_3: '
|
|
280
|
-
drawer_door_handle_3: '
|
|
278
|
+
door_handle_3: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
279
|
+
fixed_drawer_door_handle_3: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
280
|
+
drawer_door_handle_3: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
281
281
|
base_door_4: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
282
282
|
base_fixed_drawer_door_4: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
283
283
|
base_drawer_4: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
284
284
|
base_drawer_door_4: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
285
|
-
door_handle_4: '
|
|
286
|
-
fixed_drawer_door_handle_4: '
|
|
287
|
-
drawer_door_handle_4: '
|
|
285
|
+
door_handle_4: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
286
|
+
fixed_drawer_door_handle_4: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
287
|
+
drawer_door_handle_4: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
288
288
|
base_door_5: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
289
289
|
base_fixed_drawer_door_5: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
290
290
|
base_drawer_5: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
291
291
|
base_drawer_door_5: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
292
|
-
door_handle_5: '
|
|
293
|
-
fixed_drawer_door_handle_5: '
|
|
294
|
-
drawer_door_handle_5: '
|
|
292
|
+
door_handle_5: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
293
|
+
fixed_drawer_door_handle_5: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
294
|
+
drawer_door_handle_5: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
295
295
|
base_door_6: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
296
296
|
base_fixed_drawer_door_6: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
297
297
|
base_drawer_6: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
298
298
|
base_drawer_door_6: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
299
|
-
door_handle_6: '
|
|
300
|
-
fixed_drawer_door_handle_6: '
|
|
301
|
-
drawer_door_handle_6: '
|
|
299
|
+
door_handle_6: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
300
|
+
fixed_drawer_door_handle_6: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
301
|
+
drawer_door_handle_6: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
302
302
|
base_door_7: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
303
303
|
base_fixed_drawer_door_7: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
304
304
|
base_drawer_7: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
305
305
|
base_drawer_door_7: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
306
|
-
door_handle_7: '
|
|
307
|
-
fixed_drawer_door_handle_7: '
|
|
308
|
-
drawer_door_handle_7: '
|
|
306
|
+
door_handle_7: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
307
|
+
fixed_drawer_door_handle_7: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
308
|
+
drawer_door_handle_7: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
309
309
|
base_door_8: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
310
310
|
base_fixed_drawer_door_8: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
311
311
|
base_drawer_8: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
312
312
|
base_drawer_door_8: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
313
|
-
door_handle_8: '
|
|
314
|
-
fixed_drawer_door_handle_8: '
|
|
315
|
-
drawer_door_handle_8: '
|
|
313
|
+
door_handle_8: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
314
|
+
fixed_drawer_door_handle_8: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
315
|
+
drawer_door_handle_8: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
316
316
|
base_door_9: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
317
317
|
base_fixed_drawer_door_9: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
318
318
|
base_drawer_9: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
319
319
|
base_drawer_door_9: 'https://media.test.diydesignspace.com/uploads/DoorColor/202105065453_36/texture/White1px.jpeg',
|
|
320
|
-
door_handle_9: '
|
|
321
|
-
fixed_drawer_door_handle_9: '
|
|
322
|
-
drawer_door_handle_9: '
|
|
320
|
+
door_handle_9: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
321
|
+
fixed_drawer_door_handle_9: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg',
|
|
322
|
+
drawer_door_handle_9: 'https://media.test.diydesignspace.com/uploads/assets/default/steel.jpg'
|
|
323
323
|
},
|
|
324
324
|
installation_types: [125, 124]
|
|
325
325
|
}
|
|
@@ -421,6 +421,10 @@ function WorkSpace(props) {
|
|
|
421
421
|
payload: {
|
|
422
422
|
attributeName: _constants.ATT_ITEM_ROTATION,
|
|
423
423
|
value: 45
|
|
424
|
+
},
|
|
425
|
+
callback: function callback(updatedAttributeForm) {
|
|
426
|
+
console.log(updatedAttributeForm);
|
|
427
|
+
// Do something here with new attributes
|
|
424
428
|
}
|
|
425
429
|
};
|
|
426
430
|
setExternalEvent(evt);
|
|
@@ -557,74 +561,91 @@ function WorkSpace(props) {
|
|
|
557
561
|
actionType: "danger",
|
|
558
562
|
onClick: function onClick() {
|
|
559
563
|
var evt = {
|
|
560
|
-
type: _constants.
|
|
561
|
-
payload: {
|
|
564
|
+
type: _constants.EXTERNAL_EVENT_SET_FINISHING,
|
|
565
|
+
payload: {
|
|
566
|
+
category: _constants.FINISHING_TYPE.COUNTER_TOP,
|
|
567
|
+
texture: 'https://media.test.diydesignspace.com/uploads/CountTop/202111302746_7/texture/Arabescato_texture.jpg'
|
|
568
|
+
}
|
|
562
569
|
};
|
|
563
570
|
setExternalEvent(evt);
|
|
564
571
|
}
|
|
565
|
-
}, "
|
|
572
|
+
}, "Set Finishing (CounterTop)"), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
566
573
|
actionType: "danger",
|
|
567
574
|
onClick: function onClick() {
|
|
568
575
|
var evt = {
|
|
569
|
-
type: _constants.
|
|
576
|
+
type: _constants.EXTERNAL_EVENT_SET_FINISHING,
|
|
570
577
|
payload: {
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
value: new _immutable.Map({
|
|
574
|
-
length: 68.57999780544007,
|
|
575
|
-
// cm
|
|
576
|
-
_length: 27,
|
|
577
|
-
// inch
|
|
578
|
-
_unit: 'in'
|
|
579
|
-
})
|
|
578
|
+
category: _constants.FINISHING_TYPE.BACKSPLASH,
|
|
579
|
+
texture: 'https://media.test.diydesignspace.com/uploads/CountTop/202305225249_14/texture/Unique_Marquina_texture.jpg'
|
|
580
580
|
}
|
|
581
581
|
};
|
|
582
582
|
setExternalEvent(evt);
|
|
583
583
|
}
|
|
584
|
-
}, "
|
|
584
|
+
}, "Set Finishing (Backsplash)"), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
585
585
|
actionType: "danger",
|
|
586
586
|
onClick: function onClick() {
|
|
587
587
|
var evt = {
|
|
588
|
-
type: _constants.
|
|
588
|
+
type: _constants.EXTERNAL_EVENT_SET_FINISHING,
|
|
589
589
|
payload: {
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
value: new _immutable.Map({
|
|
593
|
-
length: 68.57999780544007,
|
|
594
|
-
// cm
|
|
595
|
-
_length: 27,
|
|
596
|
-
// inch
|
|
597
|
-
_unit: 'in'
|
|
598
|
-
})
|
|
590
|
+
category: _constants.FINISHING_TYPE.FLOOR_STYLE,
|
|
591
|
+
texture: 'https://media.test.diydesignspace.com/uploads/CountTop/202203163338_3/texture/oak-chestnut.webp'
|
|
599
592
|
}
|
|
600
593
|
};
|
|
601
594
|
setExternalEvent(evt);
|
|
602
595
|
}
|
|
603
|
-
}, "
|
|
596
|
+
}, "Set Finishing (Floor Style)"), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
604
597
|
actionType: "danger",
|
|
605
598
|
onClick: function onClick() {
|
|
606
599
|
var evt = {
|
|
607
|
-
type: _constants.
|
|
600
|
+
type: _constants.EXTERNAL_EVENT_SET_FINISHING,
|
|
608
601
|
payload: {
|
|
609
|
-
|
|
610
|
-
|
|
602
|
+
category: _constants.FINISHING_TYPE.WALL_COLOR,
|
|
603
|
+
color: '#bab863'
|
|
611
604
|
}
|
|
612
605
|
};
|
|
613
606
|
setExternalEvent(evt);
|
|
614
607
|
}
|
|
615
|
-
}, "
|
|
608
|
+
}, "Set Finishing (Wall Color)"), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
616
609
|
actionType: "danger",
|
|
617
610
|
onClick: function onClick() {
|
|
618
611
|
var evt = {
|
|
619
|
-
type: _constants.
|
|
612
|
+
type: _constants.EXTERNAL_EVENT_SET_FINISHING,
|
|
620
613
|
payload: {
|
|
621
|
-
|
|
622
|
-
|
|
614
|
+
category: _constants.FINISHING_TYPE.DOOR_HANDLE,
|
|
615
|
+
gltf: 'https://media.test.diydesignspace.com/uploads/DoorHandle/202107294150_29/gltf/Handle1.gltf'
|
|
623
616
|
}
|
|
624
617
|
};
|
|
625
618
|
setExternalEvent(evt);
|
|
626
619
|
}
|
|
627
|
-
}, "
|
|
620
|
+
}, "Set Finishing (Door handle)"), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
621
|
+
actionType: "danger",
|
|
622
|
+
onClick: function onClick() {
|
|
623
|
+
var evt = {
|
|
624
|
+
type: _constants.EXTERNAL_EVENT_CENTERING_2D,
|
|
625
|
+
payload: {}
|
|
626
|
+
};
|
|
627
|
+
setExternalEvent(evt);
|
|
628
|
+
}
|
|
629
|
+
}, "Centering Viewer2D"), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
630
|
+
actionType: "danger",
|
|
631
|
+
onClick: function onClick() {
|
|
632
|
+
var evt = {
|
|
633
|
+
type: _constants.EXTERNAL_EVENT_UPDATE_PROPERTY,
|
|
634
|
+
payload: {
|
|
635
|
+
propertyName: _constants.PROP_RESIZE_WIDTH,
|
|
636
|
+
// this property should be Map
|
|
637
|
+
value: new _immutable.Map({
|
|
638
|
+
length: 68.57999780544007,
|
|
639
|
+
// cm
|
|
640
|
+
_length: 27,
|
|
641
|
+
// inch
|
|
642
|
+
_unit: 'in'
|
|
643
|
+
})
|
|
644
|
+
}
|
|
645
|
+
};
|
|
646
|
+
setExternalEvent(evt);
|
|
647
|
+
}
|
|
648
|
+
}, "Change width to 27\""), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
628
649
|
actionType: "danger",
|
|
629
650
|
onClick: function onClick() {
|
|
630
651
|
var evt = {
|
|
@@ -671,4 +692,4 @@ _reactDom["default"].render(/*#__PURE__*/_react["default"].createElement(_reactC
|
|
|
671
692
|
width: width,
|
|
672
693
|
height: height
|
|
673
694
|
});
|
|
674
|
-
}), document.getElementById('app'));
|
|
695
|
+
}), document.getElementById('app') && document.getElementById('app'));
|
package/lib/plugins/SVGLoader.js
CHANGED
|
@@ -85,11 +85,13 @@ SVGLoader.prototype = Object.assign(Object.create(_three.Loader.prototype), {
|
|
|
85
85
|
case 'use':
|
|
86
86
|
style = parseStyle(node, style);
|
|
87
87
|
var usedNodeId = node.href.baseVal.substring(1);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
if (node.viewportElement.getElementById(usedNodeId)) {
|
|
89
|
+
var usedNode = node.viewportElement.getElementById(usedNodeId);
|
|
90
|
+
if (usedNode) {
|
|
91
|
+
parseNode(usedNode, style);
|
|
92
|
+
} else {
|
|
93
|
+
console.warn("SVGLoader: 'use node' references non-existent node id: " + usedNodeId);
|
|
94
|
+
}
|
|
93
95
|
}
|
|
94
96
|
break;
|
|
95
97
|
default:
|