MaterialInkTooltipComponent class

An ink-based overlay meant to deliver contextual information about the element it targets.

It is a "small" tooltip in that it ought to be one or two lines, at most, and has a maximum width of 320px.

Typically, the tooltips are associated with an icon or a button and provide a label or brief helper text about that element. This component should be used with a TooltipTarget component which controls its visibility and provides the underlying HtmlElement at which the tooltip is targeted.

Use this component in conjunction with the MaterialTooltipTargetDirective.

Consider using MaterialTooltipDirective instead; usage is much simpler and it enforces text-only small tooltips.

Implemented types
Annotations
  • @Component(selector: 'material-tooltip-text', providers: [tooltipControllerBinding], template: r''' <material-popup *ngIf="popupSource != null" ink role="tooltip" [autoDismiss]="false" enforceSpaceConstraints [matchMinSourceWidth]="false" class="aacmtit-ink-tooltip-shadow {{popupClassName}}" trackLayoutChanges [preferredPositions]="positions" [source]="popupSource" [visible]="showPopup"> <div *deferredContent class="ink-container" (mouseover)="onMouseOver()" (mouseleave)="onMouseLeave()"> {{text}}<ng-content></ng-content> </div> </material-popup>''', styleUrls: ['ink_tooltip.scss.css'], changeDetection: ChangeDetectionStrategy.onPush, directives: [DeferredContentDirective, NgIf, MaterialPopupComponent], preserveWhitespace: true)

Constructors

MaterialInkTooltipComponent(TooltipController _tooltipController, ChangeDetectorRef _changeDetector, HtmlElement hostElement, @Attribute('tooltipClass') String? tooltipClass)

Properties

hashCode int
The hash code for this object.
no setterinherited
popupClassName String
Classname applied to material-popup for use with mixins.
getter/setter pair
popupSource PopupSource?
no setter
positions List<RelativePosition>
Positions at which the tooltip should try to show.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showPopup bool
no setter
text String?
Text content of the tooltip.
getter/setter pair
tooltipHandle Tooltip
no setter
tooltipRef TooltipTarget?
The element at which this tooltip is targeted.
no getter

Methods

activate() → void
Activates this Tooltip.
override
deactivate({bool immediate = false}) → void
Deactivates this Tooltip.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onMouseLeave() → void
onMouseOver() → void
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited