User:Jack who built the house/Gadget-referenceTooltips.js: Difference between revisions

Content deleted Content added
undo
again
Line 643:
// Tooltip tail element is inside tooltip content element in order for the tooltip
// not to disappear when the mouse is above the tail
this.$tail = $( '<div>' )
.addClass( 'rt-tooltipTail' )
.prependTo( this.$element );
Line 683:
if ( tooltip.isPresent ) {
tooltip.$element.detach();
}
 
if ( tooltip.tailCss$tail.css( )'left', {'' );
tooltip.tailCss.disabled = true;
}
 
if ( activatedByClick ) {
Line 702 ⟶ 700:
offsetYCorrection = 0;
 
if ( this.tailCss$tail.css( )'left', {'' );
this.tailCss.disabled = true;
}
 
teElement = this.te.$element.get( 0 );
Line 769 ⟶ 765:
} );
if ( tooltipTailLeft ) {
this.$tail.css( 'left', ( tooltipTailLeft + 12 ) + 'px; }' );
this.tailCss = mw.util.addCSS(
'#' + $.escapeSelector( tooltip.id ) + ' .rt-tooltipTail { left: ' +
( tooltipTailLeft + 12 ) + 'px; }'
);
}
} else {
Line 786 ⟶ 779:
if ( tooltipTailLeft ) {
// 12 is the tail element width/height
this.$tail.css( 'left', tooltipTailLeft + 'px; }' );
this.tailCss = mw.util.addCSS(
'#' + $.escapeSelector( tooltip.id ) + ' .rt-tooltipTail { left: ' +
tooltipTailLeft + 'px; }'
);
}
}