mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-10 22:44:43 +08:00
@types/highchart Add support for fontMetrics method on RendererObject.
This commit is contained in:
22
types/highcharts/index.d.ts
vendored
22
types/highcharts/index.d.ts
vendored
@@ -6553,6 +6553,13 @@ declare namespace Highcharts {
|
||||
* @since 5.0.0
|
||||
*/
|
||||
definition(def: object): ElementObject;
|
||||
/**
|
||||
* Utility to return the baseline offset and total line height from the font size.
|
||||
*
|
||||
* @param fontSize The current font size to inspect. If not given, the font size will be found from the DOM element.
|
||||
* @param elem The element to inspect for a current font size.
|
||||
*/
|
||||
fontMetrics(fontSize: string, elem: ElementObject): FontMetrics;
|
||||
/**
|
||||
* Add an SVG/VML group.
|
||||
* @param [string] name The name of the group. This will be used in the class name, which will be 'highcharts-'+ name.
|
||||
@@ -6615,6 +6622,21 @@ declare namespace Highcharts {
|
||||
text(str: string, x: number, y: number): ElementObject;
|
||||
}
|
||||
|
||||
interface FontMetrics {
|
||||
/**
|
||||
* The baseline relative to the top of the box.
|
||||
*/
|
||||
b: number;
|
||||
/**
|
||||
* The font size.
|
||||
*/
|
||||
f: number;
|
||||
/**
|
||||
* The line height.
|
||||
*/
|
||||
h: number;
|
||||
}
|
||||
|
||||
interface Renderer {
|
||||
new (parentNode: HTMLElement, width: number, height: number): RendererObject;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user