@ray-js/robot-map 0.0.9-beta.2 → 0.0.9-beta.3
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.
|
@@ -115,6 +115,14 @@ const componentOptions = {
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
|
+
customCarpets: {
|
|
119
|
+
type: Array,
|
|
120
|
+
observer: function (newValue, oldValue) {
|
|
121
|
+
if (!isEqual(newValue, oldValue) && this.data.initialized && this.render) {
|
|
122
|
+
this.render.onReceiveCustomCarpets(newValue);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
118
126
|
furnitures: {
|
|
119
127
|
type: Array,
|
|
120
128
|
observer: function (newValue, oldValue) {
|
|
@@ -193,6 +201,9 @@ const componentOptions = {
|
|
|
193
201
|
if (this.data.customElements) {
|
|
194
202
|
this.render.onReceiveCustomElements(this.data.customElements);
|
|
195
203
|
}
|
|
204
|
+
if (this.data.customCarpets) {
|
|
205
|
+
this.render.onReceiveCustomCarpets(this.data.customCarpets);
|
|
206
|
+
}
|
|
196
207
|
if (this.data.furnitures) {
|
|
197
208
|
this.render.onReceiveFurnitures(this.data.furnitures);
|
|
198
209
|
}
|
|
@@ -137,6 +137,12 @@ export default Render({
|
|
|
137
137
|
this.mapInstance.drawCustomElements(elements)
|
|
138
138
|
},
|
|
139
139
|
|
|
140
|
+
// 接收自定义地毯
|
|
141
|
+
onReceiveCustomCarpets(carpets) {
|
|
142
|
+
if (!this.mapInstance || !carpets) return
|
|
143
|
+
this.mapInstance.drawCustomCarpets(carpets)
|
|
144
|
+
},
|
|
145
|
+
|
|
140
146
|
// 接收家具
|
|
141
147
|
onReceiveFurnitures(furnitures) {
|
|
142
148
|
if (!this.mapInstance || !furnitures) return
|
package/lib/RjsRobotMap.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
const _excluded = ["map", "path", "roomProperties", "forbiddenSweepZones", "forbiddenMopZones", "cleanZones", "customZones", "virtualWalls", "spots", "wayPoints", "detectedObjects", "customElements", "furnitures", "config", "runtime", "onMapReady"];
|
|
3
|
+
const _excluded = ["map", "path", "roomProperties", "forbiddenSweepZones", "forbiddenMopZones", "cleanZones", "customZones", "virtualWalls", "spots", "wayPoints", "detectedObjects", "customElements", "customCarpets", "furnitures", "config", "runtime", "onMapReady"];
|
|
4
4
|
import "core-js/modules/esnext.iterator.constructor.js";
|
|
5
5
|
import "core-js/modules/esnext.iterator.for-each.js";
|
|
6
6
|
import "core-js/modules/esnext.iterator.map.js";
|
|
@@ -29,6 +29,7 @@ const RjsRobotMap = _ref => {
|
|
|
29
29
|
wayPoints = [],
|
|
30
30
|
detectedObjects = [],
|
|
31
31
|
customElements = [],
|
|
32
|
+
customCarpets = [],
|
|
32
33
|
furnitures = [],
|
|
33
34
|
config,
|
|
34
35
|
runtime,
|
|
@@ -156,6 +157,7 @@ const RjsRobotMap = _ref => {
|
|
|
156
157
|
wayPoints: wayPoints,
|
|
157
158
|
detectedObjects: detectedObjects,
|
|
158
159
|
customElements: customElements,
|
|
160
|
+
customCarpets: customCarpets,
|
|
159
161
|
furnitures: furnitures,
|
|
160
162
|
config: config,
|
|
161
163
|
runtime: runtime,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/robot-map",
|
|
3
|
-
"version": "0.0.9-beta.
|
|
3
|
+
"version": "0.0.9-beta.3",
|
|
4
4
|
"description": "机器人地图组件",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"files": [
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@ray-js/ray": "^1.7.39"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@ray-js/robot-map-sdk": "0.0.15-beta.
|
|
36
|
+
"@ray-js/robot-map-sdk": "0.0.15-beta.5",
|
|
37
37
|
"clsx": "^1.2.1",
|
|
38
38
|
"nanoid": "^5.1.6"
|
|
39
39
|
},
|