UNPKG

@jupyterlab/git

Version:

A JupyterLab extension for version control using git

22 lines (21 loc) 536 B
// a canvas like api for building an svg path data attribute export class SVGPathData { constructor() { this._SVGPath = []; } toString() { return this._SVGPath.join(' '); } moveTo(x, y) { this._SVGPath.push(`M ${x},${y}`); } lineTo(x, y) { this._SVGPath.push(`L ${x},${y}`); } closePath() { this._SVGPath.push('Z'); } bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) { this._SVGPath.push(`C ${cp1x}, ${cp1y}, ${cp2x}, ${cp2y}, ${x}, ${y}`); } }