@marimo-team/frontend 0.21.2-dev71 → 0.21.2-dev72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.html CHANGED
@@ -66,7 +66,7 @@
66
66
  <marimo-server-token data-token="{{ server_token }}" hidden></marimo-server-token>
67
67
  <!-- /TODO -->
68
68
  <title>{{ title }}</title>
69
- <script type="module" crossorigin src="./assets/index-Deg30Btd.js"></script>
69
+ <script type="module" crossorigin src="./assets/index-DbscyW4S.js"></script>
70
70
  <link rel="modulepreload" crossorigin href="./assets/preload-helper-TXkS1QI3.js">
71
71
  <link rel="modulepreload" crossorigin href="./assets/chunk-LvLJmgfZ.js">
72
72
  <link rel="modulepreload" crossorigin href="./assets/react-Bj1aDYRI.js">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/frontend",
3
- "version": "0.21.2-dev71",
3
+ "version": "0.21.2-dev72",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -301,8 +301,9 @@ export class MatplotlibRenderer {
301
301
  canvas.width = this.#state.width * dpr;
302
302
  canvas.height = this.#state.height * dpr;
303
303
  canvas.style.width = `${this.#state.width}px`;
304
- canvas.style.height = `${this.#state.height}px`;
305
304
  canvas.style.maxWidth = "100%";
305
+ canvas.style.height = "auto";
306
+ canvas.style.aspectRatio = `${this.#state.width} / ${this.#state.height}`;
306
307
  canvas.style.touchAction = "none";
307
308
  container.append(canvas);
308
309
  this.#canvas = canvas;
@@ -344,7 +345,9 @@ export class MatplotlibRenderer {
344
345
  this.#canvas.width = state.width * dpr;
345
346
  this.#canvas.height = state.height * dpr;
346
347
  this.#canvas.style.width = `${state.width}px`;
347
- this.#canvas.style.height = `${state.height}px`;
348
+ this.#canvas.style.maxWidth = "100%";
349
+ this.#canvas.style.height = "auto";
350
+ this.#canvas.style.aspectRatio = `${state.width} / ${state.height}`;
348
351
  needsRedraw = true;
349
352
  }
350
353