fix(popup): copied over the defaults so that the users opts will override them

This way if we want to let the user pass an animation for an individual
popup we can use that animation they pass over the default ones. Fixes
#342
This commit is contained in:
Brandy Carney
2015-10-29 13:56:01 -04:00
parent 196fbe2e01
commit 4f81e5b8c8

View File

@@ -82,7 +82,9 @@ export class Popup {
opts.promiseResolve = resolve;
opts.promiseReject = reject;
return this.ctrl.open(OVERLAY_TYPE, PopupCmp, util.extend(opts, this._defaults));
let defaults = util.merge({}, this._defaults);
return this.ctrl.open(OVERLAY_TYPE, PopupCmp, util.extend(defaults, opts));
});
}