@types/d3-cloud
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -1,4 +0,4 @@ | ||
// Type definitions for d3JS cloud layout plugin by Jason Davies v1.2.2 | ||
// Type definitions for d3JS cloud layout plugin by Jason Davies v1.2.5 | ||
// Project: https://github.com/jasondavies/d3-cloud | ||
// Definitions by: hans windhoff <https://github.com/hansrwindhoff> | ||
// Definitions by: hans windhoff <https://github.com/hansrwindhoff>, locknono <https://github.com/locknono> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -74,2 +74,20 @@ | ||
/** | ||
* If specified, sets the internal random number generator,used for selecting the initial position of each word, | ||
* and the clockwise/counterclockwise direction of the spiral for each word. | ||
* | ||
* @param randomFunction should return a number in the range [0, 1).The default is Math.random. | ||
*/ | ||
random(): Cloud<T>; | ||
random(randomFunction: () => number): Cloud<T>; | ||
/** | ||
* If specified, sets the canvas generator function, which is used internally to draw text. | ||
* When using Node.js, you will almost definitely override the default, e.g. using the canvas module. | ||
* @param canvasGenerator should return a HTMLCanvasElement.The default is: ()=>{document.createElement("canvas");} | ||
* | ||
*/ | ||
canvas():Cloud<T>; | ||
canvas(canvasGenerator: () => HTMLCanvasElement): Cloud<T>; | ||
on(type: "word", listener: (word: T) => void): Cloud<T>; | ||
@@ -76,0 +94,0 @@ on(type: "end", listener: (tags: T[], bounds: { x: number; y: number }[]) => void): Cloud<T>; |
{ | ||
"name": "@types/d3-cloud", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "TypeScript definitions for d3JS cloud layout plugin by Jason Davies", | ||
@@ -11,2 +11,7 @@ "license": "MIT", | ||
"githubUsername": "hansrwindhoff" | ||
}, | ||
{ | ||
"name": "locknono", | ||
"url": "https://github.com/locknono", | ||
"githubUsername": "locknono" | ||
} | ||
@@ -18,3 +23,4 @@ ], | ||
"type": "git", | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", | ||
"directory": "types/d3-cloud" | ||
}, | ||
@@ -25,4 +31,4 @@ "scripts": {}, | ||
}, | ||
"typesPublisherContentHash": "dd62ab9c6b989222edca641681caf179581ef78ab73e413cc8efac6c1cfe2155", | ||
"typesPublisherContentHash": "349e6ed2a699a4a609fc4f32a901e6f6af0b5476582cc9ac609e2a5c2f4a4086", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -5,3 +5,3 @@ # Installation | ||
# Summary | ||
This package contains type definitions for d3JS cloud layout plugin by Jason Davies (https://github.com/jasondavies/d3-cloud). | ||
This package contains type definitions for d3JS cloud layout plugin by Jason Davies ( https://github.com/jasondavies/d3-cloud ). | ||
@@ -12,3 +12,3 @@ # Details | ||
Additional Details | ||
* Last updated: Mon, 31 Dec 2018 18:25:26 GMT | ||
* Last updated: Tue, 05 Mar 2019 17:51:16 GMT | ||
* Dependencies: @types/d3 | ||
@@ -18,2 +18,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by hans windhoff <https://github.com/hansrwindhoff>. | ||
These definitions were written by hans windhoff <https://github.com/hansrwindhoff>, locknono <https://github.com/locknono>. |
6843
81