Refactor #6826 - For ScrollPanel

pull/6841/head
Mert Sincan 2024-11-22 12:29:36 +00:00
parent caead10784
commit de770d5a3b
2 changed files with 3 additions and 2 deletions

View File

@ -138,7 +138,7 @@ export default {
this.$refs.xBar.setAttribute('data-p-scrollpanel-hidden', 'false');
!this.isUnstyled && removeClass(this.$refs.xBar, 'p-scrollpanel-hidden');
this.$refs.xBar.style.cssText = 'width:' + Math.max(this.scrollXRatio * 100, 10) + '%; left:' + (this.$refs.content.scrollLeft / totalWidth) * 100 + '%;bottom:' + bottom + 'px;';
this.$refs.xBar.style.cssText = 'width:' + Math.max(this.scrollXRatio * 100, 10) + '%; inset-inline-start:' + (Math.abs(this.$refs.content.scrollLeft) / totalWidth) * 100 + '%;bottom:' + bottom + 'px;';
}
}

View File

@ -13,7 +13,8 @@ const theme = ({ dt }) => `
.p-scrollpanel-content {
height: calc(100% + calc(2 * ${dt('scrollpanel.bar.size')}));
width: calc(100% + calc(2 * ${dt('scrollpanel.bar.size')}));
padding: 0 calc(2 * ${dt('scrollpanel.bar.size')}) calc(2 * ${dt('scrollpanel.bar.size')}) 0;
padding-inline: 0 calc(2 * ${dt('scrollpanel.bar.size')});
padding-block: 0 calc(2 * ${dt('scrollpanel.bar.size')});
position: relative;
overflow: auto;
box-sizing: border-box;