Added basic click, key, and scroll capture

This commit is contained in:
Joel Collins 2019-02-08 15:48:48 +00:00
parent 02587b5aa0
commit f5c59d3a75
3 changed files with 71 additions and 4 deletions

View file

@ -1,7 +1,7 @@
<template>
<div class="streamDisplay">
<div class="streamDisplay scrollTarget">
<img v-if="$store.state.connected" v-bind:src="streamImgUri" alt="Stream">
<img v-on:dblclick="clickmonitor" v-if="$store.state.connected" v-bind:src="streamImgUri" alt="Stream">
<div v-else-if="$store.state.waiting" class="uk-position-center">
<div uk-spinner="ratio: 4.5" ></div>
@ -14,10 +14,15 @@
export default {
name: 'streamDisplay',
methods: {
clickmonitor: function(event) {
// TODO: Add logic
console.log("The preview was clicked!");
}
},
computed: {
// a computed getter
streamImgUri: function () {
// `this` points to the vm instance
return this.$store.getters.uri + "/stream"
}
}