mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-17 00:13:17 +00:00
Include inspector change into react
This commit is contained in:
@@ -83,6 +83,12 @@ export class AppElement extends LitElement {
|
||||
return this;
|
||||
}
|
||||
|
||||
@on("inspector-changed")
|
||||
onInspectorChanged(event: studio.InspectorChanged): void {
|
||||
const data = event.detail ? JSON.parse(event.detail) : null;
|
||||
console.log("Inspector changed:", data);
|
||||
}
|
||||
|
||||
@on("keydown")
|
||||
@on("keyup")
|
||||
pipeKeyboardEvents(event: KeyboardEvent): void {
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
import {type InspectorChanged} from "@storyteller/studio";
|
||||
|
||||
document.addEventListener('inspector-changed', (event) => {
|
||||
// Cast the event to the InspectorDomChanged type to access its details in TypeScript
|
||||
const customEvent = event as InspectorChanged;
|
||||
|
||||
const data = customEvent['detail'];
|
||||
|
||||
//print to console
|
||||
console.log(data);
|
||||
|
||||
});
|
||||
@@ -1,3 +1 @@
|
||||
import "./app/app.element";
|
||||
|
||||
import "./inspector_dummy";
|
||||
import "./app/app.element";
|
||||
Reference in New Issue
Block a user