vue-wiring-diagram 1.1.10 → 1.1.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-wiring-diagram",
3
- "version": "1.1.10",
3
+ "version": "1.1.12",
4
4
  "description": "A Vue 3.x component for wiring diagram",
5
5
  "type": "module",
6
6
  "main": "dist/vue-wiring-diagram.umd.js",
@@ -3,7 +3,7 @@
3
3
  * @Date: 2024/12/10 10:01
4
4
  */
5
5
  <template>
6
- <div style="width: 100%; height: 100%">
6
+ <div style="width: 100%; height: 100%;position: relative">
7
7
  <div id="preview-container" ref="previewRef" @dblclick="zoomToFit"></div>
8
8
  <div class="spinner" v-if="loading">
9
9
  <div class="spinner1"></div>
@@ -135,12 +135,7 @@ const refreshData = () => {
135
135
  cells.value = graph.value.getCells().filter(cell => cell?.data?.type === 'text' || cell?.data?.type === 'pipe' || cell?.data?.type === 'arrow')
136
136
  cells.value.forEach(item => {
137
137
  if (item?.data?.fields?.length) {
138
- item?.data.fields.forEach(field => {
139
- if (field.field) {
140
- allFields.value.push({id: item?.id, fields: item?.data.fields})
141
- }
142
- })
143
-
138
+ allFields.value.push({id: item?.id, fields: item?.data.fields})
144
139
  }
145
140
  })
146
141
  setFieldData()