popup: {
padded: false,
align: 'center',
+ position: 'above',
$content: $popupContent
.append( descLabelWidget.$element ),
$floatableContainer: this.$element,
}
// Respond to user removing the filter
- this.controller.updateFilter( this.model.getName(), false );
- this.controller.clearHighlightColor( this.model.getName() );
+ this.controller.clearFilter( this.model.getName() );
};
mw.rcfilters.ui.CapsuleItemWidget.prototype.setHighlightColor = function () {
'mw-rcfilters-ui-capsuleItemWidget-muted',
!this.model.isSelected() ||
this.model.isIncluded() ||
- this.model.isConflicted() ||
this.model.isFullyCovered()
+ )
+ .toggleClass(
+ 'mw-rcfilters-ui-capsuleItemWidget-conflicted',
+ this.model.isConflicted()
);
};
mw.rcfilters.ui.CapsuleItemWidget.prototype.onMouseEnter = function () {
if ( this.model.getDescription() ) {
if ( !this.positioned ) {
- // Recalculate position to be center of the capsule item
- this.popup.$element.css( 'margin-left', ( this.$element.width() / 2 ) );
+ // Recalculate anchor position to be center of the capsule item
+ this.popup.$anchor.css( 'margin-left', ( this.$element.width() / 2 ) );
this.positioned = true;
}