Added scroll-to-focus
This commit is contained in:
parent
12a0acc42d
commit
61ea32efb8
1 changed files with 2 additions and 8 deletions
|
|
@ -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)
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue