Skip to content

Commit

Permalink
Rename selModal to selContainer adn selPanel to selContent in Overflo…
Browse files Browse the repository at this point in the history
…w Auto component
  • Loading branch information
janschoenherr committed Sep 11, 2018
1 parent b8709a5 commit 8160f31
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,10 @@

## WIP

### Changed

- Rename selModal to selContainer adn selPanel to selContent in Overflow Auto component

### Fixed

- Fix `isInView` function for elements with zero width and height
Expand Down
20 changes: 10 additions & 10 deletions src/js/core/overflow-auto.js
Expand Up @@ -6,23 +6,23 @@ export default {
mixins: [Class],

props: {
selModal: String,
selPanel: String,
selContainer: String,
selContent: String,
},

data: {
selModal: '.uk-modal',
selPanel: '.uk-modal-dialog',
selContainer: '.uk-container',
selContent: '.uk-modal-dialog',
},

computed: {

modal({selModal}, $el) {
return closest($el, selModal);
container({selContainer}, $el) {
return closest($el, selContainer);
},

panel({selPanel}, $el) {
return closest($el, selPanel);
content({selContent}, $el) {
return closest($el, selContent);
}

},
Expand All @@ -35,13 +35,13 @@ export default {

read() {

if (!this.panel || !this.modal) {
if (!this.content || !this.container) {
return false;
}

return {
current: toFloat(css(this.$el, 'maxHeight')),
max: Math.max(150, height(this.modal) - (offset(this.panel).height - height(this.$el)))
max: Math.max(150, height(this.container) - (offset(this.content).height - height(this.$el)))
};
},

Expand Down

0 comments on commit 8160f31

Please sign in to comment.