Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Issue#114 Add load button #121

Merged
merged 5 commits into from
Feb 14, 2023
Merged

Issue#114 Add load button #121

merged 5 commits into from
Feb 14, 2023

Conversation

ihordubas1
Copy link

No description provided.

@netlify
Copy link

netlify bot commented Feb 8, 2023

Deploy Preview for 3dstreet-editor-builds ready!

Name Link
🔨 Latest commit 52c363c
🔍 Latest deploy log https://app.netlify.com/sites/3dstreet-editor-builds/deploys/63eb1bfc71072400089c03be
😎 Deploy Preview https://deploy-preview-121--3dstreet-editor-builds.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@kfarr
Copy link
Contributor

kfarr commented Feb 9, 2023

  • on first test the new Load > 3DStreet JSON button doesn't actually load from json (it shows the file picker menu, but it does not actually load or place the json scene.
  • In other words the new button does not accomplish the same behavior as the current button on the right-hand side. Note that when loading 3dstreet json by clicking the right hand button it works. the right-hand button looks like this:
    image

attached is an example json file to test with:
sample-3dstreet-data-7.json.zip

@kfarr kfarr linked an issue Feb 9, 2023 that may be closed by this pull request
@ihordubas1
Copy link
Author

Thanks for sharing json file to test it!
Fixed this issue, but I moved functions for loading json files in component where I added Load button.
Unfortunately, we can't import them from index.html file because they are in tag <script>.
So, it will be better to create some specific file for these functions, like we have in lib folder. And then import these function to Toolbar.js component and use it for Load button.

@kfarr
Copy link
Contributor

kfarr commented Feb 10, 2023

So, it will be better to create some specific file for these functions, like we have in lib folder. And then import these function to Toolbar.js component and use it for Load button.
Yes this makes sense to put a file with these functions in lib folder.

In a perfect world these functions could be added to this file and it is identical in both 3dstreet and 3dstreet-editor repos:
https://github.com/3DStreet/3dstreet/blob/main/src/json-utils.js

however, that is common js so probably not useable as-is in this repo.

So i'm open to suggestion from you on where to put this

@ihordubas1
Copy link
Author

So i'm open to suggestion from you on where to put this

I think the good way will be to create in lib folder toolbar.js and put there all 4 functions which I took from index.html

@kfarr
Copy link
Contributor

kfarr commented Feb 11, 2023

@ihordubas1 sounds good to me, yes can you do that?

@ihordubas1
Copy link
Author

Done

@kfarr kfarr merged commit 2919af1 into master Feb 14, 2023
@kfarr kfarr deleted the issue#114 branch February 14, 2023 05:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

add load button in editor
2 participants