new dragging code

This commit is contained in:
Andrew Gundersen 2021-03-19 09:54:44 -05:00
commit be40fc0ccf
2 changed files with 92 additions and 31 deletions

View file

@ -48,10 +48,7 @@ export default defineComponent({
const yStart = window.innerHeight - 200;
// Calculate position of inputItem on drag.
const { elementX, elementY } = draggify(
{ elementId: "inputItem" },
{ x: xStart, y: yStart }
);
const { elementX, elementY } = draggify("inputItem", xStart, yStart);
// Controllers for text and audio.
const { typing } = useTextInputController(elementX)
@ -97,7 +94,7 @@ export default defineComponent({
z-index: 3;
// border: 4px solid #C6C6C6;
border-radius: 20px;
border-radius: 50%;
// Set opacity here to not affect child.
background-color: rgba(235, 235, 235, 0.75);