mirror of
https://github.com/overte-org/overte.git
synced 2025-08-14 03:45:42 +02:00
have edit.js resend properties of selected entity to entityProperties.js once it's ready
This commit is contained in:
parent
8490379517
commit
d792559d9a
2 changed files with 9 additions and 2 deletions
|
@ -1548,7 +1548,7 @@ var PropertiesTool = function (opts) {
|
|||
});
|
||||
}
|
||||
|
||||
selectionManager.addEventListener(function (selectionUpdated) {
|
||||
function updateSelections(selectionUpdated) {
|
||||
var data = {
|
||||
type: 'update'
|
||||
};
|
||||
|
@ -1589,7 +1589,8 @@ var PropertiesTool = function (opts) {
|
|||
}
|
||||
data.selections = selections;
|
||||
webView.emitScriptEvent(JSON.stringify(data));
|
||||
});
|
||||
}
|
||||
selectionManager.addEventListener(updateSelections);
|
||||
|
||||
webView.webEventReceived.connect(function (data) {
|
||||
try {
|
||||
|
@ -1751,6 +1752,8 @@ var PropertiesTool = function (opts) {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if (data.type === "propertiesPageReady") {
|
||||
updateSelections(true);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1704,4 +1704,8 @@ function loaded() {
|
|||
document.addEventListener("contextmenu", function(event) {
|
||||
event.preventDefault();
|
||||
}, false);
|
||||
|
||||
setTimeout(function() {
|
||||
EventBridge.emitWebEvent(JSON.stringify({ type: 'propertiesPageReady' }));
|
||||
}, 1000);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue