12345678910111213141516171819202122232425262728 |
- module INSPECTOR {
-
- /**
- * Creates a tooltip for the given html element
- */
- export class Tooltip {
-
- /** The tooltip is displayed for this element */
- private _elem : HTMLElement;
-
- /** The tooltip div */
- private _infoDiv : HTMLDivElement;
-
- constructor(elem: HTMLElement, tip:string) {
-
- this._elem = elem;
-
- this._infoDiv = Helpers.CreateDiv('tooltip', this._elem) as HTMLDivElement;
-
- this._elem.addEventListener('mouseover', () => {
- this._infoDiv.textContent = tip;
- this._infoDiv.style.display = 'block'
- });
- this._elem.addEventListener('mouseout', () => { this._infoDiv.style.display = 'none'});
- }
- }
- }
|