react-svg-pan-zoom
Advanced tools
Comparing version 3.7.0 to 3.7.1
@@ -12,2 +12,4 @@ "use strict"; | ||
var _common = require("../features/common"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -49,4 +51,6 @@ | ||
var event = this.originalEvent, | ||
SVGViewer = this.SVGViewer; | ||
this._cachePoint = (0, _interactions.getMousePosition)(event, SVGViewer); | ||
SVGViewer = this.SVGViewer, | ||
value = this.value; | ||
var mousePosition = (0, _interactions.getMousePosition)(event, SVGViewer); | ||
this._cachePoint = (0, _common.getSVGPoint)(value, mousePosition.x, mousePosition.y); | ||
} | ||
@@ -53,0 +57,0 @@ |
@@ -21,2 +21,3 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
import { getMousePosition } from "../features/interactions"; | ||
import { getSVGPoint } from "../features/common"; | ||
@@ -39,4 +40,6 @@ var ViewerMouseEvent = | ||
var event = this.originalEvent, | ||
SVGViewer = this.SVGViewer; | ||
this._cachePoint = getMousePosition(event, SVGViewer); | ||
SVGViewer = this.SVGViewer, | ||
value = this.value; | ||
var mousePosition = getMousePosition(event, SVGViewer); | ||
this._cachePoint = getSVGPoint(value, mousePosition.x, mousePosition.y); | ||
} | ||
@@ -43,0 +46,0 @@ |
{ | ||
"files": { | ||
"main.js": "/react-svg-pan-zoom/main.cda14ed97b5e8787bb3b.bundle.js", | ||
"main.js.map": "/react-svg-pan-zoom/main.cda14ed97b5e8787bb3b.bundle.js.map", | ||
"runtime~main.js": "/react-svg-pan-zoom/runtime~main.cda14ed97b5e8787bb3b.bundle.js", | ||
"runtime~main.js.map": "/react-svg-pan-zoom/runtime~main.cda14ed97b5e8787bb3b.bundle.js.map", | ||
"vendors~main.js": "/react-svg-pan-zoom/vendors~main.cda14ed97b5e8787bb3b.bundle.js", | ||
"vendors~main.js.map": "/react-svg-pan-zoom/vendors~main.cda14ed97b5e8787bb3b.bundle.js.map", | ||
"main.js": "/react-svg-pan-zoom/main.178b16ab73a73017075d.bundle.js", | ||
"main.js.map": "/react-svg-pan-zoom/main.178b16ab73a73017075d.bundle.js.map", | ||
"runtime~main.js": "/react-svg-pan-zoom/runtime~main.178b16ab73a73017075d.bundle.js", | ||
"runtime~main.js.map": "/react-svg-pan-zoom/runtime~main.178b16ab73a73017075d.bundle.js.map", | ||
"vendors~main.js": "/react-svg-pan-zoom/vendors~main.178b16ab73a73017075d.bundle.js", | ||
"vendors~main.js.map": "/react-svg-pan-zoom/vendors~main.178b16ab73a73017075d.bundle.js.map", | ||
"iframe.html": "/react-svg-pan-zoom/iframe.html", | ||
"precache-manifest.991f2197408034074b6eca52c26449e3.js": "/react-svg-pan-zoom/precache-manifest.991f2197408034074b6eca52c26449e3.js", | ||
"precache-manifest.50bb9a5e1e0a9c5f8816e037d0822b60.js": "/react-svg-pan-zoom/precache-manifest.50bb9a5e1e0a9c5f8816e037d0822b60.js", | ||
"service-worker.js": "/react-svg-pan-zoom/service-worker.js" | ||
}, | ||
"entrypoints": [ | ||
"runtime~main.cda14ed97b5e8787bb3b.bundle.js", | ||
"vendors~main.cda14ed97b5e8787bb3b.bundle.js", | ||
"main.cda14ed97b5e8787bb3b.bundle.js" | ||
"runtime~main.178b16ab73a73017075d.bundle.js", | ||
"vendors~main.178b16ab73a73017075d.bundle.js", | ||
"main.178b16ab73a73017075d.bundle.js" | ||
] | ||
} |
@@ -17,3 +17,3 @@ /** | ||
importScripts( | ||
"precache-manifest.991f2197408034074b6eca52c26449e3.js" | ||
"precache-manifest.50bb9a5e1e0a9c5f8816e037d0822b60.js" | ||
); | ||
@@ -20,0 +20,0 @@ |
{ | ||
"author": "chrvadala", | ||
"name": "react-svg-pan-zoom", | ||
"version": "3.7.0", | ||
"version": "3.7.1", | ||
"description": "A React component that adds pan and zoom features to SVG", | ||
@@ -6,0 +6,0 @@ "main": "./build-commonjs/index.js", |
@@ -109,1 +109,2 @@ # react-svg-pan-zoom | ||
- [krnlde](https://github.com/krnlde) | ||
- [UnHumbleBen](https://github.com/UnHumbleBen) |
import ViewerEvent from './viewer-event'; | ||
import {getMousePosition} from "../features/interactions"; | ||
import {getSVGPoint} from "../features/common"; | ||
@@ -7,4 +8,5 @@ export default class ViewerMouseEvent extends ViewerEvent { | ||
if (!this._cachePoint) { | ||
const {originalEvent: event, SVGViewer} = this; | ||
this._cachePoint = getMousePosition(event, SVGViewer) | ||
const {originalEvent: event, SVGViewer, value} = this; | ||
const mousePosition = getMousePosition(event, SVGViewer) | ||
this._cachePoint = getSVGPoint(value, mousePosition.x, mousePosition.y); | ||
} | ||
@@ -11,0 +13,0 @@ return this._cachePoint; |
Sorry, the diff of this file is not supported yet
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 too big to display
Sorry, the diff of this file is not supported yet
5269556
24354
110