mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-06 13:11:46 +00:00
[canvas-gauges] Add definition for drawing injections (#41794)
This commit is contained in:
committed by
Ben Lichtman
parent
7b6a588f0f
commit
3fd6756917
@@ -14,7 +14,41 @@ let radialOptions: RadialGaugeOptions = {
|
||||
fontNumbersWeight: 'bold'
|
||||
};
|
||||
|
||||
new LinearGauge(linearOptions);
|
||||
new RadialGauge(radialOptions);
|
||||
const linearGauge = new LinearGauge(linearOptions);
|
||||
const radialGauge = new RadialGauge(radialOptions);
|
||||
|
||||
linearGauge.on('init', () => {});
|
||||
linearGauge.on('render', () => {});
|
||||
linearGauge.on('destroy', () => {});
|
||||
linearGauge.on('animationStart', () => {});
|
||||
linearGauge.on('animate', (percent, value) => console.log(percent, value));
|
||||
linearGauge.on('animationEnd', () => {});
|
||||
linearGauge.on('beforePlate', () => {});
|
||||
linearGauge.on('beforeHighlights', () => {});
|
||||
linearGauge.on('beforeMinorTicks', () => {});
|
||||
linearGauge.on('beforeMajorTicks', () => {});
|
||||
linearGauge.on('beforeNumbers', () => {});
|
||||
linearGauge.on('beforeTitle', () => {});
|
||||
linearGauge.on('beforeUnits', () => {});
|
||||
linearGauge.on('beforeProgressBar', () => {});
|
||||
linearGauge.on('beforeValueBox', () => {});
|
||||
linearGauge.on('beforeNeedle', () => {});
|
||||
|
||||
radialGauge.on('init', () => {});
|
||||
radialGauge.on('render', () => {});
|
||||
radialGauge.on('destroy', () => {});
|
||||
radialGauge.on('animationStart', () => {});
|
||||
radialGauge.on('animate', (percent, value) => console.log(percent, value));
|
||||
radialGauge.on('animationEnd', () => {});
|
||||
radialGauge.on('beforePlate', () => {});
|
||||
radialGauge.on('beforeHighlights', () => {});
|
||||
radialGauge.on('beforeMinorTicks', () => {});
|
||||
radialGauge.on('beforeMajorTicks', () => {});
|
||||
radialGauge.on('beforeNumbers', () => {});
|
||||
radialGauge.on('beforeTitle', () => {});
|
||||
radialGauge.on('beforeUnits', () => {});
|
||||
radialGauge.on('beforeProgressBar', () => {});
|
||||
radialGauge.on('beforeValueBox', () => {});
|
||||
radialGauge.on('beforeNeedle', () => {});
|
||||
|
||||
console.log(document.gauges.length);
|
||||
|
||||
Vendored
+17
-1
@@ -118,7 +118,7 @@ declare namespace CanvasGauges {
|
||||
barProgress?: boolean,
|
||||
barShadow?: number
|
||||
}
|
||||
|
||||
|
||||
export const GenericOptions: GenericOptions;
|
||||
|
||||
export interface RadialGaugeOptions extends GenericOptions {
|
||||
@@ -247,6 +247,22 @@ declare namespace CanvasGauges {
|
||||
|
||||
constructor(options: GenericOptions);
|
||||
|
||||
public on(event: 'init', listeners: () => void): void;
|
||||
public on(event: 'render', listeners: () => void): void;
|
||||
public on(event: 'destroy', listeners: () => void): void;
|
||||
public on(event: 'animationStart', listeners: () => void): void;
|
||||
public on(event: 'animate', listeners: (percent: number, value: number) => void): void;
|
||||
public on(event: 'animationEnd', listeners: () => void): void;
|
||||
public on(event: 'beforePlate', listeners: () => void): void;
|
||||
public on(event: 'beforeHighlights', listeners: () => void): void;
|
||||
public on(event: 'beforeMinorTicks', listeners: () => void): void;
|
||||
public on(event: 'beforeMajorTicks', listeners: () => void): void;
|
||||
public on(event: 'beforeNumbers', listeners: () => void): void;
|
||||
public on(event: 'beforeTitle', listeners: () => void): void;
|
||||
public on(event: 'beforeUnits', listeners: () => void): void;
|
||||
public on(event: 'beforeProgressBar', listeners: () => void): void;
|
||||
public on(event: 'beforeValueBox', listeners: () => void): void;
|
||||
public on(event: 'beforeNeedle', listeners: () => void): void;
|
||||
public update(options: GenericOptions): BaseGauge;
|
||||
public destroy(): any;
|
||||
public abstract draw(): BaseGauge;
|
||||
|
||||
Reference in New Issue
Block a user