diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..0cd9739 --- /dev/null +++ b/.npmignore @@ -0,0 +1,4 @@ +coverage +test +/*.js +!dist \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..0a02f61 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +@icynet:registry=https://git.icynet.eu/api/packages/evert/npm/ \ No newline at end of file diff --git a/context.js b/context.js index 004c1d1..ae078ba 100644 --- a/context.js +++ b/context.js @@ -1218,6 +1218,15 @@ export default (function () { } }; + Context.prototype.isPointInStroke = function (path2d, x, y) { + if (this.__ctx) { + return this.__ctx.isPointInStroke(path2d, x, y); + } + + // TODO: method stub + return false; + } + /** * SetTransform changes the current transformation matrix to * the matrix given by the arguments as described below. diff --git a/package.json b/package.json index 75a5755..4bf8c03 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "name": "@icynet/svgcanvas", - "version": "2.5.1", + "version": "2.5.1-1", "description": "svgcanvas", "main": "dist/svgcanvas.js", "types": "types/index.d.ts", "scripts": { "watch": "rollup -c -w", "build": "rollup -c", - "prepare": "npm run build", + "prepublishOnly": "npm run build", "test": "karma start" }, "repository": { diff --git a/types/context.d.ts b/types/context.d.ts index d878cac..9e81f43 100644 --- a/types/context.d.ts +++ b/types/context.d.ts @@ -90,4 +90,6 @@ export default class Context { createImageData(): any; putImageData(): any; globalCompositeOperation(): any; + isPointInStroke(x: number, y: number): boolean; + isPointInStroke(path: Path2D, x: number, y: number): boolean; }