full fullview rendere works fine

This commit is contained in:
Peter Olu 2022-04-28 05:15:28 +01:00
parent a234993c0c
commit 5743a1cc6c
2 changed files with 3 additions and 10 deletions

View File

@ -39,11 +39,6 @@ import { useDashboardStore } from "@/store/modules/dashboard";
import Configuration from "../views/dashboard/configuration"; import Configuration from "../views/dashboard/configuration";
import controls from "../views/dashboard/controls/index"; import controls from "../views/dashboard/controls/index";
interface Item {
id: string;
index: number;
viewOffset: number;
}
export default defineComponent({ export default defineComponent({
name: "FullView", name: "FullView",
props: { props: {
@ -87,7 +82,6 @@ export default defineComponent({
}); });
} }
function scrollTo(index: number) { function scrollTo(index: number) {
const item: Element = arrayOfItems.value[index];
arrayOfItems.value[index]?.scrollIntoView(); arrayOfItems.value[index]?.scrollIntoView();
if (isScrolling.value) { if (isScrolling.value) {
setTimeout(() => { setTimeout(() => {

View File

@ -97,10 +97,10 @@ limitations under the License. -->
class="scroll-handler__wrapper" class="scroll-handler__wrapper"
> >
<div <div
@click="scrollToGraph(item.i)" @click="scrollToGraph(item.i, index)"
v-for="item in dashboardStore.currentTabItems" v-for="(item, index) in dashboardStore.currentTabItems"
:key="item.i" :key="item.i"
:class="[currentItem === `tabitem${item.i}` ? 'active' : '']" :class="[currentItem === index ? 'active' : '']"
class="scroll-to" class="scroll-to"
></div> ></div>
</div> </div>
@ -188,7 +188,6 @@ export default defineComponent({
const showTools = ref<boolean>(false); const showTools = ref<boolean>(false);
const tabRef = ref<any>(""); const tabRef = ref<any>("");
const tabObserveContainer = ref<any>(null); const tabObserveContainer = ref<any>(null);
/** UPDATING ***/
const arrayOfItems = ref<Element[]>([]); const arrayOfItems = ref<Element[]>([]);
const currentItem = ref<number>(0); const currentItem = ref<number>(0);
const isScrolling = ref(false); const isScrolling = ref(false);