Browse Source

Remove proxy calls from dimmer

pull/1615/head
jlukic 10 years ago
parent
commit
b7b4e310a1
2 changed files with 6 additions and 5 deletions
  1. 3
      RELEASE-NOTES.md
  2. 8
      src/definitions/modules/dimmer.js

3
RELEASE-NOTES.md

@ -8,10 +8,11 @@
**Enhancements** **Enhancements**
- **Sidebar** - Having a sidebar visible on page load is now much simpler. You can include ``ui visible sidebar`` on page load to have a sidebar element appear on page load. To close call `$('.ui.sidebar').sidebar('hide')` - **Sidebar** - Having a sidebar visible on page load is now much simpler. You can include ``ui visible sidebar`` on page load to have a sidebar element appear on page load. To close call `$('.ui.sidebar').sidebar('hide')`
**Code / Build** **Code / Build**
- **Build** - `Dist/` files now have file permissions `644` by default. Can adjust in `semantic.json`. You will need to run `npm install` to add the new gulp-chmod dependency *Thanks @PeterDaveHello* - **Build** - `Dist/` files now have file permissions `644` by default. Can adjust in `semantic.json`. You will need to run `npm install` to add the new gulp-chmod dependency *Thanks @PeterDaveHello*
- **Modules** - Remove use of deprecated `.size()` for `.length` across all modules - **Modules** - Remove use of deprecated `.size()` for `.length` across all modules
- **Modules** - Use of `$.proxy` swapped to native `function.call()` for performance gains
- **Modules** - Use of `$.proxy` swapped to native `function.call()` for performance gains across all modules
**Bugs** **Bugs**
- **Popup** - Popup no longer blurs element on popup hide - **Popup** - Popup no longer blurs element on popup hide

8
src/definitions/modules/dimmer.js

@ -172,8 +172,8 @@ $.fn.dimmer = function(parameters) {
module.debug('Showing dimmer', $dimmer, settings); module.debug('Showing dimmer', $dimmer, settings);
if( (!module.is.dimmed() || module.is.animating()) && module.is.enabled() ) { if( (!module.is.dimmed() || module.is.animating()) && module.is.enabled() ) {
module.animate.show(callback); module.animate.show(callback);
$.proxy(settings.onShow, element)();
$.proxy(settings.onChange, element)();
settings.onShow.call(element);
settings.onChange.call(element);
} }
else { else {
module.debug('Dimmer is already shown or disabled'); module.debug('Dimmer is already shown or disabled');
@ -188,8 +188,8 @@ $.fn.dimmer = function(parameters) {
if( module.is.dimmed() || module.is.animating() ) { if( module.is.dimmed() || module.is.animating() ) {
module.debug('Hiding dimmer', $dimmer); module.debug('Hiding dimmer', $dimmer);
module.animate.hide(callback); module.animate.hide(callback);
$.proxy(settings.onHide, element)();
$.proxy(settings.onChange, element)();
settings.onHide.call(element);
settings.onChange.call(element);
} }
else { else {
module.debug('Dimmer is not visible'); module.debug('Dimmer is not visible');

Loading…
Cancel
Save