short: number, win: number) {
// Is it close to the right/left side?
- if (percent > 0.85) {
+ if (percent > 0.75) {
inputItemPosition = win - short
}
// Is it not close to a side?
- if (percent < 0.85 && percent > 0.15) {
- inputItemPosition = inputItemPosition / win
+ if (percent < 0.75 && percent > 0.25) {
+ inputItemPosition = win * percent
}
return inputItemPosition
// Update position references when user is done moving inputItem.
const onMouseUp = (e: any) => {
- window.removeEventListener('mousemove');
+ window.removeEventListener('mousemove', onMouseMove, true);
const winW = window.innerWidth
const winH = window.innerHeight
xShort = calcSideProximity(inputItemX.value, winW)
- yShort = calcSideProximity(inputItemX.value, winW)
+ yShort = calcSideProximity(inputItemY.value, winH)
percentX = inputItemX.value / winW
percentY = inputItemY.value / winH
<template>
<TextAudioInput />
-<!-- <InputItem />
- -->
+ <InputItem />
+
<!-- List of message bubbles. -->
<div id="messenger">
<MessageItem v-for="message in messages" :message="message" :key="message.id"/>
import TextAudioInput from "@/components/taInput/index.vue";
import { Message } from "@/types/message/index";
import MessageItem from '@/components/messageItem.vue'
-// import InputItem from "@/components/inputItem.vue";
+import InputItem from "@/components/inputItem.vue";
export default defineComponent({
name: "Messenger",
components: {
TextAudioInput,
MessageItem,
- // InputItem
+ InputItem
},
setup() {
overflow-y: scroll;
- background-color: #EBEBEB;
-
bottom: 0;
}