@marimo-team/islands 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/main.js
CHANGED
|
@@ -55877,7 +55877,7 @@ ${c}
|
|
|
55877
55877
|
let c = document.createElement("canvas");
|
|
55878
55878
|
c.className = "block cursor-crosshair";
|
|
55879
55879
|
let d = globalThis.devicePixelRatio ?? 1;
|
|
55880
|
-
c.width = __privateGet(this, _n4).width * d, c.height = __privateGet(this, _n4).height * d, c.style.width = `${__privateGet(this, _n4).width}px`, c.style.height = `${__privateGet(this, _n4).
|
|
55880
|
+
c.width = __privateGet(this, _n4).width * d, c.height = __privateGet(this, _n4).height * d, c.style.width = `${__privateGet(this, _n4).width}px`, c.style.maxWidth = "100%", c.style.height = "auto", c.style.aspectRatio = `${__privateGet(this, _n4).width} / ${__privateGet(this, _n4).height}`, c.style.touchAction = "none", e.append(c), __privateSet(this, _e8, c), c.addEventListener("pointerdown", __privateGet(this, _y), {
|
|
55881
55881
|
signal: r.signal
|
|
55882
55882
|
}), c.addEventListener("pointermove", __privateGet(this, _b2), {
|
|
55883
55883
|
signal: r.signal
|
|
@@ -55895,7 +55895,7 @@ ${c}
|
|
|
55895
55895
|
let c = false;
|
|
55896
55896
|
if (e.width !== r.width || e.height !== r.height) {
|
|
55897
55897
|
let r2 = globalThis.devicePixelRatio ?? 1;
|
|
55898
|
-
__privateGet(this, _e8).width = e.width * r2, __privateGet(this, _e8).height = e.height * r2, __privateGet(this, _e8).style.width = `${e.width}px`, __privateGet(this, _e8).style.height = `${e.height}
|
|
55898
|
+
__privateGet(this, _e8).width = e.width * r2, __privateGet(this, _e8).height = e.height * r2, __privateGet(this, _e8).style.width = `${e.width}px`, __privateGet(this, _e8).style.maxWidth = "100%", __privateGet(this, _e8).style.height = "auto", __privateGet(this, _e8).style.aspectRatio = `${e.width} / ${e.height}`, c = true;
|
|
55899
55899
|
}
|
|
55900
55900
|
if (e.chartBase64 !== __privateGet(this, _s)) {
|
|
55901
55901
|
__privateMethod(this, _MatplotlibRenderer_instances, c_fn).call(this, e.chartBase64);
|
|
@@ -64766,7 +64766,7 @@ ${c}
|
|
|
64766
64766
|
return Logger.warn("Failed to get version from mount config"), null;
|
|
64767
64767
|
}
|
|
64768
64768
|
}
|
|
64769
|
-
const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.21.2-
|
|
64769
|
+
const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.21.2-dev72"), showCodeInRunModeAtom = atom(true);
|
|
64770
64770
|
atom(null);
|
|
64771
64771
|
var VIRTUAL_FILE_REGEX = /\/@file\/([^\s"&'/]+)\.([\dA-Za-z]+)/g, VirtualFileTracker = class e {
|
|
64772
64772
|
constructor() {
|
package/package.json
CHANGED
|
@@ -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.
|
|
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
|
|