Merge pull request #4019 from ryiwamoto/added_slick.autotooltips

Added slick.autotooltips.d.ts
This commit is contained in:
Masahiro Wakame
2015-04-03 01:19:03 +09:00
2 changed files with 43 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
/// <reference path="./slick.autotooltips.d.ts" />
var grid = new Slick.Grid("#myGrid", [], [], {});
grid.registerPlugin(new Slick.AutoTooltips({
enableForCells: true,
enableForHeaderCells: true,
maxToolTipLength: 100
}));
+35
View File
@@ -0,0 +1,35 @@
// Type definitions for SlickGrid AutoToolTips Plugin 2.1.0
// Project: https://github.com/mleibman/SlickGrid
// Definitions by: Ryo Iwamoto <https://github.com/ryiwamoto>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="SlickGrid.d.ts" />
declare module Slick {
export interface SlickGridAutoTooltipsOption extends PluginOptions {
/**
* Enable tooltip for grid cells
* @default true
*/
enableForCells?: boolean;
/**
* Enable tooltip for header cells
* @default false
*/
enableForHeaderCells?: boolean;
/**
* The maximum length for a tooltip
* @default null
*/
maxToolTipLength?: number;
}
/**
* AutoTooltips plugin to show/hide tooltips when columns are too narrow to fit content.
*/
export class AutoTooltips extends Plugin<Slick.SlickData> {
constructor(option?: SlickGridAutoTooltipsOption);
}
}