
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
@types/cytoscape-canvas
Advanced tools
TypeScript definitions for cytoscape-canvas
npm install --save @types/cytoscape-canvas
This package contains type definitions for cytoscape-canvas (https://github.com/classcraft/cytoscape.js-canvas).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cytoscape-canvas.
import cytoscape = require("cytoscape");
declare const cyCanvas: cytoscape.Ext;
export = cyCanvas;
export as namespace cyCanvas;
declare namespace cyCanvas {
interface Options {
/**
* The z-index of the canvas.
*/
zIndex?: number;
/**
* The pixel ratio of the canvas.
*/
pixelRatio?: number;
}
interface CanvasInstance {
/**
* Return the generated canvas.
*/
getCanvas: () => HTMLCanvasElement;
/**
* Set the context transform to match Cytoscape's zoom & pan.
* Further drawing will be on model position.
* @param ctx The canvas context.
*/
setTransform: (ctx: CanvasRenderingContext2D) => void;
/**
* Reset the context transform.
* Further drawing will be on rendered position.
* @param ctx The canvas context.
*/
resetTransform: (ctx: CanvasRenderingContext2D) => void;
/**
* Clear the entire canvas.
* @param ctx The canvas context.
*/
clear: (ctx: CanvasRenderingContext2D) => void;
}
}
declare global {
namespace cytoscape {
interface Core {
/*
* Initialize the canvas according to the given options.
*/
cyCanvas: (options?: cyCanvas.Options) => cyCanvas.CanvasInstance;
}
}
}
These definitions were written by Musa.
FAQs
TypeScript definitions for cytoscape-canvas
The npm package @types/cytoscape-canvas receives a total of 880 weekly downloads. As such, @types/cytoscape-canvas popularity was classified as not popular.
We found that @types/cytoscape-canvas demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.