@haniffalab/cherita-react 0.2.0-dev.2024-12-16.6be54149 → 0.2.0-dev.2025-01-17.f9a0f419
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.
|
@@ -43,14 +43,27 @@ function FullPage(_ref) {
|
|
|
43
43
|
(0, _react.useLayoutEffect)(() => {
|
|
44
44
|
function updateDimensions() {
|
|
45
45
|
if (targetRef.current) {
|
|
46
|
+
// Log the full viewport height
|
|
47
|
+
console.log("Full viewport height:", window.innerHeight);
|
|
48
|
+
|
|
49
|
+
// Get the distance from the top of the page to the target element
|
|
50
|
+
const rect = targetRef.current.getBoundingClientRect();
|
|
51
|
+
const distanceFromTop = rect.top + window.scrollY;
|
|
52
|
+
console.log("Distance from top of the page:", distanceFromTop);
|
|
53
|
+
|
|
54
|
+
// Calculate the available height for the Cherita app
|
|
55
|
+
const availableHeight = window.innerHeight - distanceFromTop;
|
|
56
|
+
console.log("Available height for Cherita app:", availableHeight);
|
|
57
|
+
|
|
58
|
+
// Update the dimensions to fit the viewport minus the navbar height
|
|
46
59
|
setDimensions({
|
|
47
60
|
width: targetRef.current.offsetWidth,
|
|
48
|
-
height:
|
|
61
|
+
height: availableHeight
|
|
49
62
|
});
|
|
50
63
|
}
|
|
51
64
|
}
|
|
52
65
|
window.addEventListener("resize", updateDimensions);
|
|
53
|
-
updateDimensions();
|
|
66
|
+
updateDimensions(); // Initial update
|
|
54
67
|
return () => window.removeEventListener("resize", updateDimensions);
|
|
55
68
|
}, []);
|
|
56
69
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
package/dist/css/cherita.css
CHANGED
|
@@ -11907,12 +11907,12 @@ textarea.form-control-lg {
|
|
|
11907
11907
|
margin-top: 76px;
|
|
11908
11908
|
padding: 20px;
|
|
11909
11909
|
position: relative;
|
|
11910
|
-
min-height:
|
|
11910
|
+
min-height: 400px;
|
|
11911
11911
|
}
|
|
11912
11912
|
|
|
11913
11913
|
.cherita-container-scatterplot {
|
|
11914
11914
|
position: relative;
|
|
11915
|
-
min-height:
|
|
11915
|
+
min-height: 400px;
|
|
11916
11916
|
height: 100%;
|
|
11917
11917
|
}
|
|
11918
11918
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haniffalab/cherita-react",
|
|
3
|
-
"version": "0.2.0-dev.
|
|
3
|
+
"version": "0.2.0-dev.2025-01-17.f9a0f419",
|
|
4
4
|
"author": "",
|
|
5
5
|
"license": "",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"url": "https://github.com/haniffalab/cherita-react/issues"
|
|
102
102
|
},
|
|
103
103
|
"homepage": "https://github.com/haniffalab/cherita-react#readme",
|
|
104
|
-
"prereleaseSha": "
|
|
104
|
+
"prereleaseSha": "f9a0f419a990cb5fab684b202bf30c53d20f07f1"
|
|
105
105
|
}
|
package/scss/cherita.scss
CHANGED