Skip to content

Commit

Permalink
Merge pull request #609 from 3DStreet/fix-title-display
Browse files Browse the repository at this point in the history
add newtitle event
  • Loading branch information
kfarr authored Jun 11, 2024
2 parents ea4fe4d + 0d838ee commit fcff3a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ const SceneEditTitle = ({ sceneData }) => {
}
}, [sceneData?.sceneTitle, sceneData?.sceneId, sceneId]);

useEffect(() => {
AFRAME.scenes[0].addEventListener('newTitle', (event) => {
setTitle(event.detail.sceneTitle ?? '');
});
}, []);

const handleEditClick = () => {
const newTitle = prompt('Edit the title:', title);

Expand Down
1 change: 0 additions & 1 deletion src/json-utils_1.1.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* global AFRAME, Node */
/* version: 1.0 */

window.STREET = {};
var assetsUrl;
STREET.utils = {};
Expand Down

0 comments on commit fcff3a6

Please sign in to comment.