@funnest/charts-ui 0.11.58 → 0.11.59
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.js +15 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4527,6 +4527,20 @@ function SelectionBar({ ctx }) {
|
|
|
4527
4527
|
const [menu, setMenu] = d2(null);
|
|
4528
4528
|
const [templates, setTemplates] = d2(() => readJson(TEMPLATES_KEY, {}));
|
|
4529
4529
|
const [naming, setNaming] = d2(null);
|
|
4530
|
+
const bar = T2(null);
|
|
4531
|
+
F2(() => {
|
|
4532
|
+
const pop = bar.current?.querySelector(".fnc-selbar-pop");
|
|
4533
|
+
if (!pop || !bar.current) return;
|
|
4534
|
+
pop.style.maxHeight = "";
|
|
4535
|
+
const host = ctx.root.getBoundingClientRect();
|
|
4536
|
+
const r3 = pop.getBoundingClientRect();
|
|
4537
|
+
const up = r3.bottom <= bar.current.getBoundingClientRect().top + 1;
|
|
4538
|
+
const room = up ? r3.bottom - Math.max(host.top, 0) - 8 : Math.min(host.bottom, innerHeight) - r3.top - 8;
|
|
4539
|
+
if (r3.height > room) {
|
|
4540
|
+
pop.style.maxHeight = `${Math.max(120, Math.floor(room))}px`;
|
|
4541
|
+
pop.style.overflowY = "auto";
|
|
4542
|
+
}
|
|
4543
|
+
}, [menu]);
|
|
4530
4544
|
if (!d3 || s3.layout.plotWidth <= 0) return null;
|
|
4531
4545
|
const def = ctx.chart.drawingDefinitions().find((x2) => x2.type === d3.type);
|
|
4532
4546
|
const style = d3.style ?? {};
|
|
@@ -4599,7 +4613,7 @@ function SelectionBar({ ctx }) {
|
|
|
4599
4613
|
document.addEventListener("pointermove", move);
|
|
4600
4614
|
document.addEventListener("pointerup", up);
|
|
4601
4615
|
};
|
|
4602
|
-
return /* @__PURE__ */ a3("div", { class: "fnc-selbar", role: "toolbar", style: { left: `${s3.layout.plotWidth / 2 + offset[0]}px`, top: `${8 + offset[1]}px` }, children: [
|
|
4616
|
+
return /* @__PURE__ */ a3("div", { ref: bar, class: "fnc-selbar", role: "toolbar", style: { left: `${s3.layout.plotWidth / 2 + offset[0]}px`, top: `${8 + offset[1]}px` }, children: [
|
|
4603
4617
|
/* @__PURE__ */ a3(
|
|
4604
4618
|
"button",
|
|
4605
4619
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funnest/charts-ui",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.59",
|
|
4
4
|
"description": "Pro trading UI (toolbar, drawing tools, sheets) for Funnest Charts. Framework-agnostic.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chart",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"NOTICE"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@funnest/charts": "0.11.
|
|
45
|
+
"@funnest/charts": "0.11.59"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"preact": "^11.2.0"
|