@ray-js/robot-map 0.0.2-beta-23 → 0.0.2-beta-25

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.
@@ -5,6 +5,7 @@ import "core-js/modules/web.dom-collections.iterator.js";
5
5
  /* eslint-disable func-names */
6
6
  import Render from './index.rjs';
7
7
  import { MAP_API_METHODS, MAP_CALLBACK_METHODS } from '@ray-js/robot-map-sdk';
8
+ import { isEqual } from 'lodash-es';
8
9
  const componentOptions = {
9
10
  options: {
10
11
  pureDataPattern: /^init$/
@@ -33,7 +34,7 @@ const componentOptions = {
33
34
  roomProperties: {
34
35
  type: Array,
35
36
  observer: function (newValue, oldValue) {
36
- if (newValue !== oldValue && this.data.initialized && this.render) {
37
+ if (!isEqual(newValue, oldValue) && this.data.initialized && this.render) {
37
38
  this.render.onReceiveRoomProperties(newValue);
38
39
  }
39
40
  }
@@ -41,7 +42,7 @@ const componentOptions = {
41
42
  forbiddenSweepZones: {
42
43
  type: Array,
43
44
  observer: function (newValue, oldValue) {
44
- if (newValue !== oldValue && this.data.initialized && this.render) {
45
+ if (!isEqual(newValue, oldValue) && this.data.initialized && this.render) {
45
46
  this.render.onReceiveForbiddenSweepZones(newValue);
46
47
  }
47
48
  }
@@ -49,7 +50,7 @@ const componentOptions = {
49
50
  forbiddenMopZones: {
50
51
  type: Array,
51
52
  observer: function (newValue, oldValue) {
52
- if (newValue !== oldValue && this.data.initialized && this.render) {
53
+ if (!isEqual(newValue, oldValue) && this.data.initialized && this.render) {
53
54
  this.render.onReceiveForbiddenMopZones(newValue);
54
55
  }
55
56
  }
@@ -57,7 +58,7 @@ const componentOptions = {
57
58
  cleanZones: {
58
59
  type: Array,
59
60
  observer: function (newValue, oldValue) {
60
- if (newValue !== oldValue && this.data.initialized && this.render) {
61
+ if (!isEqual(newValue, oldValue) && this.data.initialized && this.render) {
61
62
  this.render.onReceiveCleanZones(newValue);
62
63
  }
63
64
  }
@@ -65,7 +66,7 @@ const componentOptions = {
65
66
  spots: {
66
67
  type: Array,
67
68
  observer: function (newValue, oldValue) {
68
- if (newValue !== oldValue && this.data.initialized && this.render) {
69
+ if (!isEqual(newValue, oldValue) && this.data.initialized && this.render) {
69
70
  this.render.onReceiveSpots(newValue);
70
71
  }
71
72
  }
@@ -73,7 +74,7 @@ const componentOptions = {
73
74
  virtualWalls: {
74
75
  type: Array,
75
76
  observer: function (newValue, oldValue) {
76
- if (newValue !== oldValue && this.data.initialized && this.render) {
77
+ if (!isEqual(newValue, oldValue) && this.data.initialized && this.render) {
77
78
  this.render.onReceiveVirtualWalls(newValue);
78
79
  }
79
80
  }
@@ -81,7 +82,7 @@ const componentOptions = {
81
82
  detectedObjects: {
82
83
  type: Array,
83
84
  observer: function (newValue, oldValue) {
84
- if (newValue !== oldValue && this.data.initialized && this.render) {
85
+ if (!isEqual(newValue, oldValue) && this.data.initialized && this.render) {
85
86
  this.render.onReceiveDetectedObjects(newValue);
86
87
  }
87
88
  }
@@ -89,7 +90,7 @@ const componentOptions = {
89
90
  customElements: {
90
91
  type: Array,
91
92
  observer: function (newValue, oldValue) {
92
- if (newValue !== oldValue && this.data.initialized && this.render) {
93
+ if (!isEqual(newValue, oldValue) && this.data.initialized && this.render) {
93
94
  this.render.onReceiveCustomElements(newValue);
94
95
  }
95
96
  }
@@ -103,7 +104,7 @@ const componentOptions = {
103
104
  runtime: {
104
105
  type: Object,
105
106
  observer: function (newValue, oldValue) {
106
- if (newValue && newValue !== oldValue && this.data.initialized && this.render) {
107
+ if (!isEqual(newValue, oldValue) && this.data.initialized && this.render) {
107
108
  this.render.onUpdateRuntime(newValue);
108
109
  }
109
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/robot-map",
3
- "version": "0.0.2-beta-23",
3
+ "version": "0.0.2-beta-25",
4
4
  "description": "机器人地图组件",
5
5
  "main": "lib/index",
6
6
  "files": [
@@ -32,7 +32,7 @@
32
32
  "@ray-js/ray": "^1.7.39"
33
33
  },
34
34
  "dependencies": {
35
- "@ray-js/robot-map-sdk": "0.0.3-beta-30",
35
+ "@ray-js/robot-map-sdk": "0.0.3-beta-32",
36
36
  "clsx": "^1.2.1",
37
37
  "nanoid": "^5.1.6"
38
38
  },