improvements to controller scroll groups
This commit is contained in:
parent
66a659ad77
commit
b446b82c7b
4 changed files with 19 additions and 10 deletions
|
@ -184,10 +184,6 @@ export class BrowserWindow {
|
|||
page: "plugins-github",
|
||||
component: `<plugins-github></plugins-github>`,
|
||||
condition: `page == 'plugins-github'`
|
||||
}, {
|
||||
page: "podcasts",
|
||||
component: `<apple-podcasts></apple-podcasts>`,
|
||||
condition: `page == 'podcasts'`
|
||||
}, {
|
||||
page: "remote-pair",
|
||||
component: `<remote-pair></remote-pair>`,
|
||||
|
|
|
@ -336,6 +336,7 @@ const app = new Vue({
|
|||
let buttonPressDelay = 500
|
||||
let stickDeadZone = 0.2
|
||||
let scrollGroup = null
|
||||
let scrollGroupY = null
|
||||
|
||||
let cursorSpeed = cursorSpeedPvt
|
||||
|
||||
|
@ -374,11 +375,14 @@ const app = new Vue({
|
|||
}
|
||||
|
||||
// RIGHT STICK.
|
||||
if (gp.axes[3] > stickDeadZone) {
|
||||
$("#app-content").scrollTop($("#app-content").scrollTop() + (gp.axes[3] * scrollSpeed))
|
||||
} else if (gp.axes[3] < -stickDeadZone) {
|
||||
$("#app-content").scrollTop($("#app-content").scrollTop() + (gp.axes[3] * scrollSpeed))
|
||||
if(scrollGroupY) {
|
||||
if (gp.axes[3] > stickDeadZone) {
|
||||
$(scrollGroupY).scrollTop($(scrollGroupY).scrollTop() + (gp.axes[3] * scrollSpeed))
|
||||
} else if (gp.axes[3] < -stickDeadZone) {
|
||||
$(scrollGroupY).scrollTop($(scrollGroupY).scrollTop() + (gp.axes[3] * scrollSpeed))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (scrollGroup) {
|
||||
|
@ -472,6 +476,15 @@ const app = new Vue({
|
|||
|
||||
if (element) {
|
||||
let closest = element.closest("[tabindex], input, button, a")
|
||||
|
||||
// VERT SCROLL
|
||||
let scrollGroupCloY = element.closest(`[scrollaxis="y"]`)
|
||||
if (scrollGroupCloY) {
|
||||
scrollGroupY = scrollGroupCloY
|
||||
}
|
||||
|
||||
|
||||
// HOZ SCROLL
|
||||
let scrollGroupClo = element.closest(".v-hl-container")
|
||||
|
||||
if (scrollGroupClo) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div id="app-content" :style="{'overflow': (chrome.contentAreaScrolling ? '' : 'hidden')}">
|
||||
<div id="app-content" scrollaxis="y" :style="{'overflow': (chrome.contentAreaScrolling ? '' : 'hidden')}">
|
||||
<div id="navigation-bar">
|
||||
<button class="nav-item" @click="navigateBack()">
|
||||
<%- include('../svg/chevron-left.svg') %>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="app-sidebar-content">
|
||||
<div class="app-sidebar-content" scrollaxis="y">
|
||||
<div class="app-sidebar-header-text">
|
||||
{{$root.getLz('app.name')}}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue