+1
-1
@@ -16,3 +16,3 @@ const PI_OVER_180 = Math.PI / 180; | ||
| _global: glob, | ||
| version: '10.0.11', | ||
| version: '10.0.12', | ||
| isBrowser: detectBrowser(), | ||
@@ -19,0 +19,0 @@ isUnminified: /param/.test(function (param) { }.toString()), |
+17
-8
@@ -440,13 +440,22 @@ import { Konva } from "./Global.js"; | ||
| const c = this.createCanvasElement(); | ||
| c.width = 1; | ||
| c.height = 1; | ||
| c.width = 10; | ||
| c.height = 10; | ||
| const ctx = c.getContext('2d', { | ||
| willReadFrequently: true, | ||
| }); | ||
| ctx.clearRect(0, 0, 1, 1); | ||
| ctx.fillStyle = 'rgba(255,0,255,1)'; | ||
| ctx.fillRect(0, 0, 1, 1); | ||
| const d = ctx.getImageData(0, 0, 1, 1).data; | ||
| const exact = d[0] === 255 && d[1] === 0 && d[2] === 255 && d[3] === 255; | ||
| _isCanvasFarblingActive = !exact; | ||
| ctx.clearRect(0, 0, 10, 10); | ||
| ctx.fillStyle = '#282828'; | ||
| ctx.fillRect(0, 0, 10, 10); | ||
| const d = ctx.getImageData(0, 0, 10, 10).data; | ||
| let isFarbling = false; | ||
| for (let i = 0; i < 100; i++) { | ||
| if (d[i * 4] !== 40 || | ||
| d[i * 4 + 1] !== 40 || | ||
| d[i * 4 + 2] !== 40 || | ||
| d[i * 4 + 3] !== 255) { | ||
| isFarbling = true; | ||
| break; | ||
| } | ||
| } | ||
| _isCanvasFarblingActive = isFarbling; | ||
| this.releaseCanvas(c); | ||
@@ -453,0 +462,0 @@ return _isCanvasFarblingActive; |
+1
-1
| { | ||
| "name": "konva", | ||
| "version": "10.0.11", | ||
| "version": "10.0.12", | ||
| "description": "HTML5 2d canvas library.", | ||
@@ -5,0 +5,0 @@ "author": "Anton Lavrenov", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1453198
0.04%34282
0.06%