From b462dbc8ad59e5f3f28014e7efcb2fa9665ad72f Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Fri, 13 Apr 2018 13:47:10 -0400 Subject: [PATCH] update coordiantes --- app.js | 8 +++++++- index.html | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index e9671d8..18fdbdc 100644 --- a/app.js +++ b/app.js @@ -1,11 +1,17 @@ var app = new Vue({ el: '#app', data: { - counter: 0 + counter: 0, + x: 0, + y: 0, }, methods:{ click(){ this.counter++; + }, + updateCoordinates(event){ + this.x = event.clientX; + this.y = event.clientY; } } }) diff --git a/index.html b/index.html index 4cf4f04..98d313f 100644 --- a/index.html +++ b/index.html @@ -9,6 +9,7 @@

{{ counter }}

+

Coordinates {{x}} {{y}}