Skip to content
Snippets Groups Projects
Commit c18c89b3 authored by chris's avatar chris
Browse files

move position at end of line

parent 80260f91
No related branches found
No related tags found
No related merge requests found
/* eslint-disable react/prop-types */
import React, {
useRef,
useEffect,
......@@ -106,7 +107,7 @@ const AskAIOverlay = ({ setPosition, position, config }) => {
const [result, setResult] = useState('');
const [isSubmitted, setIsSubmitted] = useState(false);
const [isLoading, setIsLoading] = useState(false);
const AskAiContentTransformation = config.AskAiContentTransformation;
const { AskAiContentTransformation } = config;
const inputRef = useRef(null);
const [isScrollable, setIsScrollable] = useState(false);
const resultDivRef = useRef(null);
......@@ -122,7 +123,8 @@ const AskAIOverlay = ({ setPosition, position, config }) => {
if (overLayComponent)
overLayComponentCoords = overLayComponent.getBoundingClientRect();
const top = end.top - WaxSurface.top + 20;
const left = end.left - WaxSurface.left - overLayComponentCoords.width / 2;
// const left = end.left - WaxSurface.left - overLayComponentCoords.width / 2;
const left = end.left - WaxSurface.left - 50;
setPosition({ ...position, left, top });
}, [position.left]);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment