-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get max width property of scrollable area. #87
Comments
Sorry for the delay in the response... |
Thanks for the tip, this is a jQuery way, but it has some issues. The content of the scroll area is dynamic, and driven by another component. So when a length of the scrolling area is different, jQuery still has the original value. Would there be an Ember tied way that updates the jQuery values on change / action trigger? Current code: // component-name.js
actions: {
next() {
let current = this.get('scrollToX');
let scrollWidth = this.$(".tse-scroll-content").outerWidth();
let maxBoundsOffset = '0';
if (current <= (scrollWidth - maxBoundsOffset)) {
this.setProperties({
scrollToX: (current + 250),
});
}
},
prev() {
let current = this.get('scrollToX');
let minBoundsOffset = '100';
if (current >= minBoundsOffset) {
this.setProperties({
scrollToX: (current - 250),
});
}
}
}
}); |
@bmx269 I think you may be able to leverage the Maybe it's something we might be able to leverage the |
I am not able to get the
width
property on the scrollable area.I have made paging controls, to allow user interactions for scrolling, and I need to get the max width of the area, so I stop the scrolling action. Any suggestions?
The text was updated successfully, but these errors were encountered: