Skip to content
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

[Visibility] refreshOnResize Missing Default Value #2615

Closed
faller opened this issue Jul 13, 2015 · 2 comments
Closed

[Visibility] refreshOnResize Missing Default Value #2615

faller opened this issue Jul 13, 2015 · 2 comments
Milestone

Comments

@faller
Copy link

faller commented Jul 13, 2015

1."settings.refreshOnResize" only appear once in the code, and it seems invalid when window.resize
https://github.com/Semantic-Org/Semantic-UI/blob/master/src/definitions/behaviors/visibility.js#L167

2.Docs use "settings.checkOnResize" but the code use "settings.checkOnRefresh"?
https://github.com/Semantic-Org/Semantic-UI/blob/master/src/definitions/behaviors/visibility.js#L1175

3.Can one element use visibility twice ? I need different offset but it seems invalid when using visibility twice.

thank you so much!

@jlukic
Copy link
Member

jlukic commented Jul 13, 2015

1/2) . refreshOnResize is missing its default setting. This is a typo and a bug. Thanks for the catch.

  • checkOnRefresh is whether it should check position anytime it refreshes (which could be manually, resize, or mutation observers)
  • refreshOnResize should be a separate setting that determines whether browser resize should refresh positions
  1. You can overload any UI with two modules by changing the namespace, e.g.
$('.foo')
  .visibility( onTopVisible: function(){})
  .visibility( namespace: 'visibility2', onTopVisible: function() {}})
;

I intend to put examples of this in the module docs whenever I get time.

@jlukic jlukic added this to the 2.0.4 milestone Jul 13, 2015
@faller
Copy link
Author

faller commented Jul 13, 2015

thanks for answering.

@jlukic jlukic changed the title three questions on visibility [Visibility] refreshOnResize Missing Default Value Jul 13, 2015
@jlukic jlukic closed this as completed Jul 13, 2015
jlukic added a commit that referenced this issue Jul 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants