@opendata-ai/openchart-vanilla 8.0.0-rc.21 → 8.0.0-rc.23
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.
|
@@ -413,8 +413,13 @@ var ScatterCanvasRenderer = class {
|
|
|
413
413
|
|
|
414
414
|
// src/scatter-canvas/state.ts
|
|
415
415
|
function flattenFill(fill) {
|
|
416
|
-
if (typeof fill === "string") return fill;
|
|
417
|
-
return fill.stops[0]?.color ?? "
|
|
416
|
+
if (typeof fill === "string") return fill.toLowerCase() === "none" ? "transparent" : fill;
|
|
417
|
+
return fill.stops[0]?.color ?? "transparent";
|
|
418
|
+
}
|
|
419
|
+
function normalizeStroke(stroke) {
|
|
420
|
+
if (!stroke) return "";
|
|
421
|
+
const lower = stroke.toLowerCase();
|
|
422
|
+
return lower === "none" || lower === "transparent" ? "" : stroke;
|
|
418
423
|
}
|
|
419
424
|
function collectGridlines(axis, orient, out) {
|
|
420
425
|
if (!axis) return;
|
|
@@ -467,7 +472,7 @@ function buildPointsSoA(layout) {
|
|
|
467
472
|
soa.r[j] = mark.r;
|
|
468
473
|
soa.fill[j] = flattenFill(mark.fill);
|
|
469
474
|
soa.fillOpacity[j] = mark.fillOpacity ?? 1;
|
|
470
|
-
soa.stroke[j] = mark.stroke
|
|
475
|
+
soa.stroke[j] = normalizeStroke(mark.stroke);
|
|
471
476
|
soa.strokeWidth[j] = mark.strokeWidth ?? 0;
|
|
472
477
|
soa.keys[j] = mark.key;
|
|
473
478
|
soa.markIds[j] = markId;
|
|
@@ -5241,12 +5246,14 @@ function wireCanvasInteractions({
|
|
|
5241
5246
|
canvas.addEventListener("pointermove", handlePointerMove);
|
|
5242
5247
|
canvas.addEventListener("pointerdown", handlePointerDown);
|
|
5243
5248
|
canvas.addEventListener("pointerleave", handlePointerLeave);
|
|
5249
|
+
canvas.addEventListener("pointerenter", invalidateRects);
|
|
5244
5250
|
window.addEventListener("scroll", invalidateRects, true);
|
|
5245
5251
|
window.addEventListener("resize", invalidateRects);
|
|
5246
5252
|
return () => {
|
|
5247
5253
|
canvas.removeEventListener("pointermove", handlePointerMove);
|
|
5248
5254
|
canvas.removeEventListener("pointerdown", handlePointerDown);
|
|
5249
5255
|
canvas.removeEventListener("pointerleave", handlePointerLeave);
|
|
5256
|
+
canvas.removeEventListener("pointerenter", invalidateRects);
|
|
5250
5257
|
window.removeEventListener("scroll", invalidateRects, true);
|
|
5251
5258
|
window.removeEventListener("resize", invalidateRects);
|
|
5252
5259
|
};
|
|
@@ -8329,4 +8336,4 @@ export {
|
|
|
8329
8336
|
scrubCamera,
|
|
8330
8337
|
createMap
|
|
8331
8338
|
};
|
|
8332
|
-
//# sourceMappingURL=chunk-
|
|
8339
|
+
//# sourceMappingURL=chunk-2YWRNRUK.js.map
|