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

v3: figure not displayed #677

Open
eliselavy opened this issue Nov 20, 2024 · 1 comment
Open

v3: figure not displayed #677

eliselavy opened this issue Nov 20, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@eliselavy
Copy link
Collaborator

eliselavy commented Nov 20, 2024

Binary content is in the output cell but not displayed:

  • by default

V3:
https://journalofdigitalhistory.org/en/notebook-viewer/JTJGcHJveHktZ2l0aHVidXNlcmNvbnRlbnQlMkZqZGgtb2JzZXJ2ZXIlMkZCdVd2dEpGeGgzd3klMkZtYWluJTJGYXJ0aWNsZS5pcHluYg==?idx=89&v=3

Previous version:
https://journalofdigitalhistory.org/en/notebook-viewer/JTJGcHJveHktZ2l0aHVidXNlcmNvbnRlbnQlMkZqZGgtb2JzZXJ2ZXIlMkZCdVd2dEpGeGgzd3klMkZtYWluJTJGYXJ0aWNsZS5pcHluYg==?idx=89

def image_metadata(image: str, metadata:str = None):
    if metadata is not None:
        metadata =  {
            "jdh": {
                "module": "object",
                "object": {
                    "type":"image",
                    "source": [metadata]
                }
            }
        }
    if not Path(image).exists():
        print(f'THE IMAGE DOES NOT EXIST: SKIPPING')
        return   

and by executing code:

Screenshot 2024-11-20 at 15 05 22

@frederic-reis
Copy link
Collaborator

frederic-reis commented Nov 20, 2024

The image is not displayed because there is no aspect-ratio and no height tags.
It's a bug that appeared by fixing #653

It's fixed now. But without any tag, the height of the picture is defined on the half of the window height (see #653 for the rules)
https://journalofdigitalhistory.netlify.app/en/notebook-viewer/JTJGcHJveHktZ2l0aHVidXNlcmNvbnRlbnQlMkZqZGgtb2JzZXJ2ZXIlMkZCdVd2dEpGeGgzd3klMkZtYWluJTJGYXJ0aWNsZS5pcHluYg==?idx=89&v=3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants