mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-27 11:40:08 +08:00
Adding in some missing definitions for SigmaJs.
This commit is contained in:
Vendored
+29
-2
@@ -15,10 +15,17 @@ declare module SigmaJs{
|
||||
graphPosition(x: number, y:number): {x: number; y: number};
|
||||
ratio: number;
|
||||
readPrefix: string;
|
||||
settings(setting: string) : any;
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
interface Canvas {
|
||||
edges: {[renderType: string]: Function};
|
||||
labels: {[renderType: string]: Function};
|
||||
nodes: {[renderType: string]: Function};
|
||||
}
|
||||
|
||||
interface Classes {
|
||||
configurable: Configurable;
|
||||
graph: Graph;
|
||||
@@ -39,6 +46,7 @@ declare module SigmaJs{
|
||||
}
|
||||
|
||||
interface Edge {
|
||||
[key : string] : any;
|
||||
color?: string;
|
||||
id: string;
|
||||
size?: number;
|
||||
@@ -74,6 +82,11 @@ declare module SigmaJs{
|
||||
nodes(ids: string[]): Node[];
|
||||
}
|
||||
|
||||
interface GraphData {
|
||||
edges: Edge[];
|
||||
nodes: Node[];
|
||||
}
|
||||
|
||||
interface Image {
|
||||
clip?: number;
|
||||
scale?: number;
|
||||
@@ -87,6 +100,7 @@ declare module SigmaJs{
|
||||
}
|
||||
|
||||
interface Node {
|
||||
[key : string] : any;
|
||||
color?: string;
|
||||
id: string;
|
||||
image?: any;
|
||||
@@ -149,7 +163,7 @@ declare module SigmaJs{
|
||||
|
||||
interface SigmaConfigs {
|
||||
container?: Element;
|
||||
graph?: Graph;
|
||||
graph?: GraphData;
|
||||
id?: string;
|
||||
renderers?: Renderer[];
|
||||
settings?: { [index: string]: any };
|
||||
@@ -160,10 +174,12 @@ declare module SigmaJs{
|
||||
new(container: string): Sigma;
|
||||
new(container: Element): Sigma;
|
||||
new(configuration: SigmaConfigs): Sigma;
|
||||
canvas: Canvas;
|
||||
classes:Classes;
|
||||
misc: Miscellaneous;
|
||||
parsers: Parsers;
|
||||
plugins: Plugins;
|
||||
svg: SVG;
|
||||
}
|
||||
|
||||
interface Settings {
|
||||
@@ -269,8 +285,19 @@ declare module SigmaJs{
|
||||
// Animation settings
|
||||
animationsTime?: number;
|
||||
}
|
||||
|
||||
interface SVG {
|
||||
edges: {[renderType: string]: SVGObject<SigmaJs.Edge>};
|
||||
labels: {[renderType: string]: SVGObject<SigmaJs.Node>};
|
||||
nodes: {[renderType: string]: SVGObject<SigmaJs.Node>};
|
||||
}
|
||||
|
||||
interface SVGObject<T> {
|
||||
create: (object: T, ...a:any[]) => Element;
|
||||
update: (object: T, ...a:any[]) => void;
|
||||
}
|
||||
}
|
||||
|
||||
declare var sigma: SigmaJs.SigmaFactory;
|
||||
declare var CustomShapes: SigmaJs.CustomShapes;
|
||||
declare var ShapeLibrary: SigmaJs.CustomShapes;
|
||||
declare var ShapeLibrary: SigmaJs.CustomShapes;
|
||||
Reference in New Issue
Block a user