react-zoom-pan-pinch
Advanced tools
Comparing version 2.2.0 to 2.2.1
{ | ||
"name": "react-zoom-pan-pinch", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Zoom and pan html elements in easy way", | ||
@@ -5,0 +5,0 @@ "author": "prc5", |
@@ -8,3 +8,11 @@ import { StateType } from "models"; | ||
): string => { | ||
return `matrix(${scale}, 0,0, ${scale}, ${x}, ${y})`; | ||
// The shorthand for matrix does not work for Safari hence the need to explicitly use matrix3d | ||
// Refer to https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix | ||
const a = scale; | ||
const b = 0; | ||
const c = 0; | ||
const d = scale; | ||
const tx = x; | ||
const ty = y; | ||
return `matrix3d(${a}, ${b}, 0, 0, ${c}, ${d}, 0, 0, 0, 0, 1, 0, ${tx}, ${ty}, 0, 1)`; | ||
}; | ||
@@ -11,0 +19,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1334895
191664
7043