dcim-topology2d 1.0.3 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/chart-diagram/src/echarts/index.js +3 -6
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/core/src/activeLayer.d.ts +2 -10
- package/core/src/activeLayer.js +42 -41
- package/core/src/animateLayer.d.ts +3 -7
- package/core/src/animateLayer.js +10 -12
- package/core/src/calling.d.ts +1 -4
- package/core/src/calling.js +38 -41
- package/core/src/canvas.d.ts +1 -6
- package/core/src/canvas.js +17 -18
- package/core/src/common.d.ts +5 -5
- package/core/src/common.js +146 -109
- package/core/src/core.d.ts +3 -4
- package/core/src/core.js +222 -251
- package/core/src/divLayer.d.ts +2 -7
- package/core/src/divLayer.js +25 -25
- package/core/src/healps/changeData.js +20 -3
- package/core/src/hoverLayer.d.ts +2 -9
- package/core/src/hoverLayer.js +31 -34
- package/core/src/models/index.d.ts +0 -1
- package/core/src/models/index.js +0 -1
- package/core/src/offscreen.d.ts +1 -4
- package/core/src/offscreen.js +10 -8
- package/core/src/options.js +1 -0
- package/core/src/preview.d.ts +1 -13
- package/core/src/preview.js +26 -27
- package/core/src/renderLayer.d.ts +1 -3
- package/core/src/renderLayer.js +26 -31
- package/core/src/store/common.d.ts +9 -0
- package/core/src/store/common.js +5 -0
- package/core/src/store/data.d.ts +126 -0
- package/core/src/store/data.js +80 -0
- package/core/src/store/index.d.ts +2 -0
- package/core/src/store/index.js +2 -0
- package/core/src/utils/conversion.d.ts +7 -0
- package/core/src/utils/conversion.js +54 -0
- package/core/src/utils/dom.d.ts +4 -3
- package/package.json +1 -1
- package/core/src/models/data.d.ts +0 -26
- package/core/src/models/data.js +0 -77
- package/core/src/models/data.js.map +0 -1
- package/core/src/mqtt.d.ts +0 -14
- package/core/src/mqtt.js +0 -82
- package/core/src/mqtt.js.map +0 -1
- package/core/src/socket.d.ts +0 -10
- package/core/src/socket.js +0 -51
- package/core/src/socket.js.map +0 -1
package/core/src/socket.js
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
import { EventType } from './models';
|
2
|
-
var Socket = /** @class */ (function () {
|
3
|
-
function Socket(url, data) {
|
4
|
-
var _this = this;
|
5
|
-
this.url = url;
|
6
|
-
this.data = data;
|
7
|
-
this.onmessage = function (e) {
|
8
|
-
if (!_this.data.pens.length || !e || !e.data) {
|
9
|
-
return;
|
10
|
-
}
|
11
|
-
var msg;
|
12
|
-
try {
|
13
|
-
msg = JSON.parse(e.data);
|
14
|
-
}
|
15
|
-
catch (error) {
|
16
|
-
msg = e.data;
|
17
|
-
}
|
18
|
-
for (var _i = 0, _a = _this.data.pens; _i < _a.length; _i++) {
|
19
|
-
var item = _a[_i];
|
20
|
-
for (var _b = 0, _c = item.events; _b < _c.length; _b++) {
|
21
|
-
var event_1 = _c[_b];
|
22
|
-
if (event_1.type === EventType.WebSocket) {
|
23
|
-
if (event_1.name && event_1.name === msg.event) {
|
24
|
-
item.doSocketMqtt(event_1, msg.data, _this.socket);
|
25
|
-
}
|
26
|
-
else if (!event_1.name && msg) {
|
27
|
-
item.doSocketMqtt(event_1, msg, _this.socket);
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
31
|
-
}
|
32
|
-
};
|
33
|
-
this.init();
|
34
|
-
}
|
35
|
-
Socket.prototype.init = function () {
|
36
|
-
var _this = this;
|
37
|
-
this.socket = new WebSocket(this.url);
|
38
|
-
this.socket.onmessage = this.onmessage;
|
39
|
-
this.socket.onclose = function () {
|
40
|
-
console.log('Canvas websocket closed and reconneting...');
|
41
|
-
_this.init();
|
42
|
-
};
|
43
|
-
};
|
44
|
-
Socket.prototype.close = function () {
|
45
|
-
this.socket.onclose = null;
|
46
|
-
this.socket.close();
|
47
|
-
};
|
48
|
-
return Socket;
|
49
|
-
}());
|
50
|
-
export { Socket };
|
51
|
-
//# sourceMappingURL=socket.js.map
|
package/core/src/socket.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"socket.js","sourceRoot":"","sources":["../../../packages/core/src/socket.ts"],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