From 61ea32efb80cbd760f355258aad2118928a74211 Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Tue, 12 Feb 2019 14:34:11 +0000 Subject: [PATCH] Added scroll-to-focus --- src/components/paneNavigate.vue | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/components/paneNavigate.vue b/src/components/paneNavigate.vue index 8d64a79c..b1c9f846 100644 --- a/src/components/paneNavigate.vue +++ b/src/components/paneNavigate.vue @@ -101,16 +101,10 @@ export default { methods: { // Handle global mouse wheel events to be associated with navigation wheelMonitor: function(event) { - // TODO: Add logic - console.log(event.deltaY) - console.log(event.target.parentNode.classList) - // Only capture scroll if the event target's parent contains the "scrollTarget" class if (event.target.parentNode.classList.contains("scrollTarget")) { - console.log("Wheel captured"); - } - else { - console.log("Scrolled outside of a scroll capture target") + var z_rel = (event.deltaY)/100 * this.stepZz + this.moveRequest(0, 0, z_rel, false) } },