Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug: Add min API that allows to get/set camera from dbg console. #43

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

MisterGC
Copy link
Contributor

Motivation and scope: In the scope of testing scalability/performance of erdblick, I needed a way to always use the same location for my tests. I have thought about different ways how to achieve this with the current state of implementation. My conclusion was that it would be good if there'd be a component that allows me to add debug functionality easily but without polluting the regular code base, therfore I suggest to introduce the ErdblickDebugApi class.

Testing: To test this API, you can follow these steps using your browser's developer console:

  1. Get Current Camera Information

    const cameraInfo = window.ebDebug.getCamera();
    console.log(cameraInfo);
  2. Set Camera Position Using Previous Information

    window.ebDebug.setCamera(cameraInfo);

Simply copy the output from getCamera() and use it as input for setCamera(). This allows you to share and reuse camera positions across different sessions effortlessly.

@josephbirkner
Copy link
Collaborator

I think this might be a good solution, also to toggle the loading indicator dots on/off.

What do you think about directly adding a function like flyToMunich? Imo, we can make this class as convenient as we like.

@MisterGC
Copy link
Contributor Author

I think this might be a good solution, also to toggle the loading indicator dots on/off.

What do you think about directly adding a function like flyToMunich? Imo, we can make this class as convenient as we like.

Yes, I agree, it's a development tool and small utilities that ease debugging and/or profiling should be directly added. If the API is fine for you, I'd say we should merge this PR and every dev can add functionality on demand.

Base automatically changed from feature/polylines to main October 19, 2023 10:16
@josephbirkner josephbirkner merged commit b6517bf into main Oct 19, 2023
1 check passed
@josephbirkner josephbirkner deleted the feature/intro-debug-api branch October 19, 2023 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants