mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix pop-out debug window for all the recent updates
This commit is contained in:
parent
c09bea4710
commit
835ad29417
@ -1,28 +1,30 @@
|
||||
$(function() {
|
||||
var options = {
|
||||
messageMouseEnter: function(sourceId) {
|
||||
window.opener.postMessage({event:"mouseEnter",id:sourceId},'*');
|
||||
},
|
||||
messageMouseLeave: function(sourceId) {
|
||||
window.opener.postMessage({event:"mouseLeave",id:sourceId},'*');
|
||||
},
|
||||
messageSourceClick: function(sourceId) {
|
||||
window.opener.postMessage({event:"mouseClick",id:sourceId},'*');
|
||||
},
|
||||
clear: function() {
|
||||
window.opener.postMessage({event:"clear"},'*');
|
||||
RED.i18n.init(function() {
|
||||
var options = {
|
||||
messageMouseEnter: function(sourceId) {
|
||||
window.opener.postMessage({event:"mouseEnter",id:sourceId},'*');
|
||||
},
|
||||
messageMouseLeave: function(sourceId) {
|
||||
window.opener.postMessage({event:"mouseLeave",id:sourceId},'*');
|
||||
},
|
||||
messageSourceClick: function(sourceId) {
|
||||
window.opener.postMessage({event:"mouseClick",id:sourceId},'*');
|
||||
},
|
||||
clear: function() {
|
||||
window.opener.postMessage({event:"clear"},'*');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var uiComponents = RED.debug.init(options);
|
||||
var uiComponents = RED.debug.init(options);
|
||||
|
||||
$(".debug-window").append(uiComponents.content);
|
||||
$(".debug-window").append(uiComponents.content);
|
||||
|
||||
window.addEventListener('message',function(evt) {
|
||||
if (evt.data.event === "message") {
|
||||
RED.debug.handleDebugMessage(evt.data.msg);
|
||||
} else if (evt.data.event === "workspaceChange") {
|
||||
RED.debug.refreshMessageList(evt.data.activeWorkspace);
|
||||
}
|
||||
},false);
|
||||
window.addEventListener('message',function(evt) {
|
||||
if (evt.data.event === "message") {
|
||||
RED.debug.handleDebugMessage(evt.data.msg);
|
||||
} else if (evt.data.event === "workspaceChange") {
|
||||
RED.debug.refreshMessageList(evt.data.activeWorkspace);
|
||||
}
|
||||
},false);
|
||||
})
|
||||
});
|
||||
|
@ -1,5 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<link href="../../vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
|
||||
<link rel="stylesheet" href="../../red/style.min.css">
|
||||
<link rel="stylesheet" href="../../vendor/font-awesome/css/font-awesome.min.css">
|
||||
<title>Node-RED Debug Tools</title>
|
||||
@ -7,7 +8,7 @@
|
||||
<body class="debug-window">
|
||||
</body>
|
||||
<script src="../../vendor/vendor.js"></script>
|
||||
<script src="../../red/red.js"></script>
|
||||
<script src="../../red/red.min.js"></script>
|
||||
<script src="debug-utils.js"></script>
|
||||
<script src="debug.js"></script>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user