aboutsummaryrefslogtreecommitdiffstats
path: root/svg.js.d.ts
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-05-11 12:14:37 +0200
committerGitHub <noreply@github.com>2018-05-11 12:14:37 +0200
commit60376c1862f651b9ac54bbab88b3a3a901f1b3bf (patch)
treeb71c44d5142b430f16c121aeac0e6bfbb34cfa59 /svg.js.d.ts
parentb0ca7491ace6f404c82607f59b22aaa3419ad0c0 (diff)
parent641699afaa97e66e79f089d43d65a532a4c60a67 (diff)
downloadsvg.js-60376c1862f651b9ac54bbab88b3a3a901f1b3bf.tar.gz
svg.js-60376c1862f651b9ac54bbab88b3a3a901f1b3bf.zip
Merge pull request #854 from pycraft114/master
fix typings
Diffstat (limited to 'svg.js.d.ts')
-rw-r--r--svg.js.d.ts17
1 files changed, 9 insertions, 8 deletions
diff --git a/svg.js.d.ts b/svg.js.d.ts
index 39d3e95..f482de7 100644
--- a/svg.js.d.ts
+++ b/svg.js.d.ts
@@ -105,7 +105,7 @@ declare namespace svgjs {
}
interface Element {
bbox(): BBox;
- rbox(): RBox;
+ rbox(element?: Element): RBox;
tbox(): TBox;
}
interface Library {
@@ -283,8 +283,8 @@ declare namespace svgjs {
svg(svg: string): this;
svg(): string;
- writeDataToDom(): this,
- setData(data: object): this,
+ writeDataToDom(): this;
+ setData(data: object): this;
is(cls: any): boolean;
}
@@ -317,9 +317,10 @@ declare namespace svgjs {
// event.js
interface Element {
on(event: string, cb: Function, context?: Object): this;
- off(event: string, cb: Function, context?: Object): this;
+ off(event: string, cb?: Function, context?: Object): this;
fire(event: string, data?: any): this;
fire(event: Event): this;
+ event(): Event | CustomEvent;
click(cb: Function): this;
dblclick(cb: Function): this;
@@ -1014,10 +1015,10 @@ declare namespace svgjs {
to(value: number): Animation;
after(cb: () => void): Animation;
- rotate(degrees: number, cx?: number, cy?: number): Animation
- skew(skewX: number, skewY?: number, cx?: number, cy?: number): Animation
- scale(scaleX: number, scaleY?: number, cx?: number, cy?: number): Animation
- translate(x: number, y: number): Animation
+ rotate(degrees: number, cx?: number, cy?: number): Animation;
+ skew(skewX: number, skewY?: number, cx?: number, cy?: number): Animation;
+ scale(scaleX: number, scaleY?: number, cx?: number, cy?: number): Animation;
+ translate(x: number, y: number): Animation;
// TODO style, etc, bbox...
}