Title: Fix resize drift bug, may depend on devicePixelRatio · Issue #62 · PAIR-code/megaplot · GitHub
Open Graph Title: Fix resize drift bug, may depend on devicePixelRatio · Issue #62 · PAIR-code/megaplot
X Title: Fix resize drift bug, may depend on devicePixelRatio · Issue #62 · PAIR-code/megaplot
Description: The Scene's resize() method allows the caller to recompute the offset and the underlying canvas element's dimensions after the canvas DOM size has been changed. If resize() is not called, then the canvas element's dimensions will often h...
Open Graph Description: The Scene's resize() method allows the caller to recompute the offset and the underlying canvas element's dimensions after the canvas DOM size has been changed. If resize() is not called, then the ...
X Description: The Scene's resize() method allows the caller to recompute the offset and the underlying canvas element's dimensions after the canvas DOM size has been changed. If resize() is not called, t...
Opengraph URL: https://github.com/PAIR-code/megaplot/issues/62
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Fix resize drift bug, may depend on devicePixelRatio","articleBody":"The Scene's `resize()` method allows the caller to recompute the `offset` and the underlying canvas element's dimensions after the canvas DOM size has been changed. If `resize()` is not called, then the canvas element's dimensions will often have a different aspect ratio from the DOM size and cause the rendered visualization to appear stretched or squished.\r\n\r\nThe `resize()` method takes an optional fixed canvas point. This point specifies the pixel location to keep fixed after the aspect ratio transformation. By default, the fixed canvas point used will be the center point of the canvas. Using `scene.offset` as the fixed point should have the effect of preserving the location of the world origin (0,0).\r\n\r\nThere is a bug where one or both of the `offset` components may be a pixel off after the `resize()`. If calls to `resize()` are repeated, this can cause the offset to creep in one direction or the other. This seems to occur more readily when the `devicePixelRatio` is 1.\r\n\r\nDevelop an example which consistently produces this behavior, then fix it.","author":{"url":"https://github.com/jimbojw","@type":"Person","name":"jimbojw"},"datePublished":"2022-09-28T16:57:28.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/62/megaplot/issues/62"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cce33ac4-06ff-228e-0cda-e69eacc57df5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A48E:E9E68:344E49:456D14:6A4ED823 |
| html-safe-nonce | 40ba5bacb95456225ca7d865f4fefbf9b0c9755de1f3d947d9f8c15c13f45e58 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDhFOkU5RTY4OjM0NEU0OTo0NTZEMTQ6NkE0RUQ4MjMiLCJ2aXNpdG9yX2lkIjoiODY1MTg0MjgzMjIwODY4MDk5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e678919293b73af5d0637e50dca3762d977f24b4aa43191d6eb65eaacbd1eb31 |
| hovercard-subject-tag | issue:1389680662 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PAIR-code/megaplot/62/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c141ca85f6c70bb4c58531e89d6f7bf91f7af5ab381d76ff0e66b0848c1ebca6/PAIR-code/megaplot/issues/62 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c141ca85f6c70bb4c58531e89d6f7bf91f7af5ab381d76ff0e66b0848c1ebca6/PAIR-code/megaplot/issues/62 |
| og:image:alt | The Scene's resize() method allows the caller to recompute the offset and the underlying canvas element's dimensions after the canvas DOM size has been changed. If resize() is not called, then the ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jimbojw |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| turbo-cache-control | no-preview |
| go-import | github.com/PAIR-code/megaplot git https://github.com/PAIR-code/megaplot.git |
| octolytics-dimension-user_id | 29804435 |
| octolytics-dimension-user_login | PAIR-code |
| octolytics-dimension-repository_id | 451893434 |
| octolytics-dimension-repository_nwo | PAIR-code/megaplot |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 451893434 |
| octolytics-dimension-repository_network_root_nwo | PAIR-code/megaplot |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c37fe3e3f5f306900bd5b6bee97463f66c938b2c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width