fix: tour animated
parent
83017269ab
commit
c36f7e701f
|
@ -43,6 +43,10 @@ export default function useTarget(
|
||||||
const [posInfo, setPosInfo] = useState<PosInfo>(null);
|
const [posInfo, setPosInfo] = useState<PosInfo>(null);
|
||||||
|
|
||||||
const updatePos = () => {
|
const updatePos = () => {
|
||||||
|
if (!open.value) {
|
||||||
|
setPosInfo(null);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (targetElement.value) {
|
if (targetElement.value) {
|
||||||
// Exist target element. We should scroll and get target position
|
// Exist target element. We should scroll and get target position
|
||||||
if (!isInViewPort(targetElement.value) && open.value) {
|
if (!isInViewPort(targetElement.value) && open.value) {
|
||||||
|
|
Loading…
Reference in New Issue