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

Changing toaster settings replaces settings instead of extending #1

Closed
scottoffen opened this issue Oct 18, 2014 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@scottoffen
Copy link
Owner

Attempting to change the CSS in the toaster settings replaced the toaster settings object instead of extending it.

Example:
$.toaster({ settings : { toaster : { css : { "bottom" : "0px" } } } });

@scottoffen scottoffen added the bug label Oct 18, 2014
@scottoffen scottoffen self-assigned this Oct 18, 2014
@scottoffen
Copy link
Owner Author

I think I'll fix this by moving the settings to a separate method call:

$.toaster.settings('toaster', { css : { "bottom" : "0px" } } );

or maybe

$.toaster.settings.toaster('css', { "bottom" : "0px" });

@jairmilanes
Copy link

I had the same problem, the solution I've found was this:

 settings = $.extend(true, {}, settings, options.settings);

This will recursively re-build the settings object correctly, hope it helps!

scottoffen pushed a commit that referenced this issue Aug 12, 2015
@scottoffen scottoffen added this to the 1.1 milestone Aug 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants