@graph-paper/core
Advanced tools
Comparing version 0.0.0-alpha.13 to 0.0.0-alpha.14
@@ -43,7 +43,14 @@ // eslint-disable-next-line import/no-extraneous-dependencies | ||
el.style.opacity = "0"; | ||
if (isVisible && entered) { | ||
if (newText && isVisible && entered) { | ||
setTimeout(() => { | ||
el.style.visibility = "visible"; | ||
el.style.opacity = "1"; | ||
visible = true; | ||
}); | ||
} else { | ||
setTimeout(() => { | ||
el.style.opacity = "0"; | ||
el.style.visibility = "hidden"; | ||
// visible = false; | ||
}); | ||
} | ||
@@ -50,0 +57,0 @@ setLocation(); |
{ | ||
"name": "@graph-paper/core", | ||
"version": "0.0.0-alpha.13", | ||
"version": "0.0.0-alpha.14", | ||
"description": "__DESCRIPTION_FORTHCOMING__", | ||
@@ -18,3 +18,3 @@ "author": "Hamilton Ulmer <hamilton.ulmer@gmail.com>", | ||
}, | ||
"gitHead": "229881a6e32f156affdbd9c41a9681b81e05f272" | ||
"gitHead": "1c158a136c0d59734b4686f3b2a25b33b5730da8" | ||
} |
@@ -37,2 +37,3 @@ /* eslint-disable import/prefer-default-export */ | ||
windowHeight = window.innerHeight, | ||
pad = 16 * 2, | ||
}) { | ||
@@ -78,4 +79,5 @@ let left; | ||
// if bottom edge of float is below height | ||
if (top + elementHeight > windowHeight) { | ||
top = parentBottom - elementHeight; | ||
if (top + elementHeight > windowHeight - pad) { | ||
// top = parentBottom - elementHeight; | ||
top = Math.max(pad, windowHeight - elementHeight - pad); | ||
} | ||
@@ -82,0 +84,0 @@ } else if (alignment === "bottom") { |
@@ -17,3 +17,6 @@ // https://stackoverflow.com/a/3028037/4297741 | ||
}; | ||
document.addEventListener("click", outsideClickListener); | ||
setTimeout(() => { | ||
document.addEventListener("click", outsideClickListener); | ||
}); | ||
return removeClickListener; | ||
} |
@@ -31,2 +31,3 @@ // taken from d3-array | ||
const hi = firstIndexAbove({ data, value: highestValue, key }); | ||
let current; | ||
@@ -41,2 +42,5 @@ let previous; | ||
current = lo; | ||
} else if (candidate > hi) { | ||
previous = hi - 1; | ||
current = hi; | ||
} else if (candidate === data.length) { | ||
@@ -76,3 +80,2 @@ // right edge | ||
}); | ||
return { | ||
@@ -79,0 +82,0 @@ previousIndex: previous, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54160
1207