Socket
Socket
Sign inDemoInstall

@types/react-canvas-draw

Package Overview
Dependencies
3
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.1

36

react-canvas-draw/index.d.ts

@@ -9,20 +9,20 @@ // Type definitions for react-canvas-draw 1.1

export interface CanvasDrawProps {
onChange?: ((canvas: CanvasDraw) => void) | null;
loadTimeOffset?: number;
lazyRadius?: number;
brushRadius?: number;
brushColor?: string;
catenaryColor?: string;
gridColor?: string;
backgroundColor?: string;
hideGrid?: boolean;
canvasWidth?: number | string;
canvasHeight?: number | string;
disabled?: boolean;
imgSrc?: string;
saveData?: string;
immediateLoading?: boolean;
hideInterface?: boolean;
className?: string;
style?: React.CSSProperties;
onChange?: ((canvas: CanvasDraw) => void) | null | undefined;
loadTimeOffset?: number | undefined;
lazyRadius?: number | undefined;
brushRadius?: number | undefined;
brushColor?: string | undefined;
catenaryColor?: string | undefined;
gridColor?: string | undefined;
backgroundColor?: string | undefined;
hideGrid?: boolean | undefined;
canvasWidth?: number | string | undefined;
canvasHeight?: number | string | undefined;
disabled?: boolean | undefined;
imgSrc?: string | undefined;
saveData?: string | undefined;
immediateLoading?: boolean | undefined;
hideInterface?: boolean | undefined;
className?: string | undefined;
style?: React.CSSProperties | undefined;
}

@@ -29,0 +29,0 @@

{
"name": "@types/react-canvas-draw",
"version": "1.1.0",
"version": "1.1.1",
"description": "TypeScript definitions for react-canvas-draw",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-canvas-draw",
"license": "MIT",

@@ -24,4 +25,4 @@ "contributors": [

},
"typesPublisherContentHash": "0cff15ad3348a7e63a9c716bb4547b2f8bebb90e281cbfcf1abea3253311bc5e",
"typeScriptVersion": "2.8"
"typesPublisherContentHash": "69ac07dd96762a77761c0af0b11320a4c72f74fcd3e5a618e8bca6026a46367f",
"typeScriptVersion": "3.6"
}

@@ -9,5 +9,59 @@ # Installation

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-canvas-draw.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-canvas-draw/index.d.ts)
````ts
// Type definitions for react-canvas-draw 1.1
// Project: https://embiem.github.io/react-canvas-draw/
// Definitions by: Kamil Socha <https://github.com/ksocha>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import * as React from 'react';
export interface CanvasDrawProps {
onChange?: ((canvas: CanvasDraw) => void) | null | undefined;
loadTimeOffset?: number | undefined;
lazyRadius?: number | undefined;
brushRadius?: number | undefined;
brushColor?: string | undefined;
catenaryColor?: string | undefined;
gridColor?: string | undefined;
backgroundColor?: string | undefined;
hideGrid?: boolean | undefined;
canvasWidth?: number | string | undefined;
canvasHeight?: number | string | undefined;
disabled?: boolean | undefined;
imgSrc?: string | undefined;
saveData?: string | undefined;
immediateLoading?: boolean | undefined;
hideInterface?: boolean | undefined;
className?: string | undefined;
style?: React.CSSProperties | undefined;
}
export default class CanvasDraw extends React.Component<CanvasDrawProps> {
/**
* Returns the drawing's save-data as a stringified object.
*/
getSaveData(): string;
/**
* Loads a previously saved drawing using the saveData string, as well as an optional boolean
* flag to load it immediately, instead of live-drawing it.
*/
loadSaveData(saveData: string, immediate?: boolean): void;
/**
* Clears the canvas completely.
*/
clear(): void;
/**
* Removes the latest change to the drawing. This includes everything drawn since the last MouseDown event.
*/
undo(): void;
}
````
### Additional Details
* Last updated: Sat, 11 Jan 2020 00:31:10 GMT
* Last updated: Thu, 08 Jul 2021 20:20:30 GMT
* Dependencies: [@types/react](https://npmjs.com/package/@types/react)

@@ -17,2 +71,2 @@ * Global values: none

# Credits
These definitions were written by Kamil Socha (https://github.com/ksocha).
These definitions were written by [Kamil Socha](https://github.com/ksocha).

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc