Skip to content

Safari Zooming Messing Up Seismograph Rendering #78

@NavigSB

Description

@NavigSB

Hey Phillip! Noticed a bit of a Safari-specific issue, and I played around with it a bit and couldn't find a great solution. Not a huge deal, but just wanted to bring it to your attention

1. Problem Statement

On Safari, when you zoom the browser window in or out, Seismograph element data resizes differently from the rest of the SVG, causing the data to be either too long or too short for the foreignObject/canvas. It doesn't seem to actually be Safari's calculation of the canvas sizing because that seems to be as it should be in the dev tools, but the data is rendered outside that zone! It seems like this issue isn't unique to Seisplot, as I've seen other people online complain about how Safari renders foreignObjects specifically if I remember right.

The result of zooming Safari in by one interval on Tutorial 1:

Image

2. Describe the solution you'd like

A fix that keeps the canvas rendering inside its boundaries correctly on resizes. I would imagine it isn't a huge change to get it to do this, but I certainly couldn't see what it should be very quickly.

3. Assumptions

  • I'm assuming that this change is only on Safari because that's the only place I've seen it. I'm also assuming that this happens for iOS Safari as well as MacOS Safari, but I've only observed it on Mac (granted, 5+ Macs on different versions, so I think it's consistent)
  • I'm assuming that it's only the zooming on Safari that causes this, but I haven't seen it on any other functionality

4. Use Cases

Just that the Seismographs render the right size on Safari even when a user zooms in

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions