@riil-frontend/component-topology 3.1.9 → 3.1.10
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/CHANGELOG.md +2 -1
- package/build/index.js +1 -1
- package/es/core/models/TopoApp.js +1 -1
- package/es/models/customIcon.js +16 -11
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/models/customIcon.js +16 -11
- package/package.json +2 -2
|
@@ -20,7 +20,7 @@ import { updateEdgeExpanded } from "../utils/edgeUtil";
|
|
|
20
20
|
import PluginManager from "./PluginManager";
|
|
21
21
|
import topoFactory from "./topoFactory"; // eslint-disable-next-line no-undef
|
|
22
22
|
|
|
23
|
-
var version = typeof "3.1.
|
|
23
|
+
var version = typeof "3.1.10" === 'string' ? "3.1.10" : null;
|
|
24
24
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
25
25
|
/**
|
|
26
26
|
* 拓扑显示和编辑
|
package/es/models/customIcon.js
CHANGED
|
@@ -153,7 +153,7 @@ export default function (engine) {
|
|
|
153
153
|
var _this3 = this;
|
|
154
154
|
|
|
155
155
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
|
156
|
-
var data;
|
|
156
|
+
var data, allIcons, newIcons;
|
|
157
157
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
158
158
|
while (1) {
|
|
159
159
|
switch (_context4.prev = _context4.next) {
|
|
@@ -161,25 +161,30 @@ export default function (engine) {
|
|
|
161
161
|
data = payload.data;
|
|
162
162
|
|
|
163
163
|
_this3.update({
|
|
164
|
-
visible: false
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
container: []
|
|
168
|
-
}
|
|
169
|
-
});
|
|
164
|
+
visible: false
|
|
165
|
+
}); // 注册
|
|
166
|
+
|
|
170
167
|
|
|
171
168
|
data.forEach(function (icon) {
|
|
172
169
|
var iconUrl = topoService.icon.getIconImageUrl(icon.id);
|
|
173
170
|
window.ht.Default.setImage(getCustomIconHtId(icon.id), iconUrl);
|
|
171
|
+
});
|
|
172
|
+
_context4.next = 5;
|
|
173
|
+
return _this3.loadCustomIcons();
|
|
174
|
+
|
|
175
|
+
case 5:
|
|
176
|
+
allIcons = _context4.sent;
|
|
177
|
+
newIcons = allIcons.node.filter(function (icon) {
|
|
178
|
+
return !!data.find(function (item) {
|
|
179
|
+
return item.id === icon.id;
|
|
180
|
+
});
|
|
174
181
|
}); // 通知ht
|
|
175
182
|
|
|
176
183
|
engine.view.topoClient.emitEvent('topo_shape_upload_finish', _extends({}, payload, {
|
|
177
|
-
data: transformCustomIcons2HtIcons(
|
|
184
|
+
data: transformCustomIcons2HtIcons(newIcons)
|
|
178
185
|
}));
|
|
179
|
-
_context4.next = 6;
|
|
180
|
-
return _this3.loadCustomIcons();
|
|
181
186
|
|
|
182
|
-
case
|
|
187
|
+
case 8:
|
|
183
188
|
case "end":
|
|
184
189
|
return _context4.stop();
|
|
185
190
|
}
|
|
@@ -48,7 +48,7 @@ var _PluginManager = _interopRequireDefault(require("./PluginManager"));
|
|
|
48
48
|
var _topoFactory = _interopRequireDefault(require("./topoFactory"));
|
|
49
49
|
|
|
50
50
|
// eslint-disable-next-line no-undef
|
|
51
|
-
var version = typeof "3.1.
|
|
51
|
+
var version = typeof "3.1.10" === 'string' ? "3.1.10" : null;
|
|
52
52
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
53
53
|
/**
|
|
54
54
|
* 拓扑显示和编辑
|
package/lib/models/customIcon.js
CHANGED
|
@@ -167,7 +167,7 @@ function _default(engine) {
|
|
|
167
167
|
var _this3 = this;
|
|
168
168
|
|
|
169
169
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
|
170
|
-
var data;
|
|
170
|
+
var data, allIcons, newIcons;
|
|
171
171
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
172
172
|
while (1) {
|
|
173
173
|
switch (_context4.prev = _context4.next) {
|
|
@@ -175,26 +175,31 @@ function _default(engine) {
|
|
|
175
175
|
data = payload.data;
|
|
176
176
|
|
|
177
177
|
_this3.update({
|
|
178
|
-
visible: false
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
container: []
|
|
182
|
-
}
|
|
183
|
-
});
|
|
178
|
+
visible: false
|
|
179
|
+
}); // 注册
|
|
180
|
+
|
|
184
181
|
|
|
185
182
|
data.forEach(function (icon) {
|
|
186
183
|
var iconUrl = _topo["default"].icon.getIconImageUrl(icon.id);
|
|
187
184
|
|
|
188
185
|
window.ht.Default.setImage((0, _icon.getCustomIconHtId)(icon.id), iconUrl);
|
|
186
|
+
});
|
|
187
|
+
_context4.next = 5;
|
|
188
|
+
return _this3.loadCustomIcons();
|
|
189
|
+
|
|
190
|
+
case 5:
|
|
191
|
+
allIcons = _context4.sent;
|
|
192
|
+
newIcons = allIcons.node.filter(function (icon) {
|
|
193
|
+
return !!data.find(function (item) {
|
|
194
|
+
return item.id === icon.id;
|
|
195
|
+
});
|
|
189
196
|
}); // 通知ht
|
|
190
197
|
|
|
191
198
|
engine.view.topoClient.emitEvent('topo_shape_upload_finish', (0, _extends2["default"])({}, payload, {
|
|
192
|
-
data: (0, _icon.transformCustomIcons2HtIcons)(
|
|
199
|
+
data: (0, _icon.transformCustomIcons2HtIcons)(newIcons)
|
|
193
200
|
}));
|
|
194
|
-
_context4.next = 6;
|
|
195
|
-
return _this3.loadCustomIcons();
|
|
196
201
|
|
|
197
|
-
case
|
|
202
|
+
case 8:
|
|
198
203
|
case "end":
|
|
199
204
|
return _context4.stop();
|
|
200
205
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riil-frontend/component-topology",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.10",
|
|
4
4
|
"description": "拓扑",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "build-scripts start",
|
|
@@ -110,6 +110,6 @@
|
|
|
110
110
|
"access": "public"
|
|
111
111
|
},
|
|
112
112
|
"license": "MIT",
|
|
113
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@3.1.
|
|
113
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@3.1.10/build/index.html",
|
|
114
114
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
|
115
115
|
}
|