minor refactoring of card-contents-base mixin

This commit is contained in:
Vinoth Kannan 2019-01-09 19:32:30 +05:30
parent abee39ecd0
commit 1f12a377fa

View File

@ -124,8 +124,7 @@ export default Ember.Mixin.create({
});
this.appEvents.on(`topic-header:trigger-${id}`, (username, $target) => {
this.set("isFixed", true);
this.set("isDocked", true);
this.setProperties({ isFixed: true, isDocked: true });
return this._show(username, $target);
});
},
@ -188,8 +187,9 @@ export default Ember.Mixin.create({
}
}
if (isDocked && position.top < 44) {
position.top = 44;
const avatarOverflowSize = 44;
if (isDocked && position.top < avatarOverflowSize) {
position.top = avatarOverflowSize;
}
this.$().css(position);