Skip to content

Commit

Permalink
Build and bump
Browse files Browse the repository at this point in the history
  • Loading branch information
bumbu committed Jul 26, 2017
1 parent fa1aad1 commit f324a9d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
7 changes: 5 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svg-pan-zoom",
"version": "3.5.1",
"version": "3.5.2",
"homepage": "https://github.com/ariutta/svg-pan-zoom",
"authors": [
"Andrea Leofreddi <a.leofreddi@itcharm.com>",
Expand All @@ -20,7 +20,10 @@
"Ionică Bizău (http://ionicabizau.net/)",
"Ciprian Placintă (https://github.com/CiprianPlacinta)",
"Riccardo Santoro (https://github.com/VeNoMiS)",
"César Vidril (https://github.com/Yimiprod)"
"César Vidril (https://github.com/Yimiprod)",
"Androl Genhald (https://github.com/AndrolGenhald)",
"James Newell (https://github.com/musicfuel)",
"KoenkookpotPlasmans (https://github.com/KoenkookpotPlasmans)"
],
"description": "JavaScript library for panning and zooming an SVG image from the mouse, touches and programmatically.",
"main": "dist/svg-pan-zoom.js",
Expand Down
21 changes: 9 additions & 12 deletions dist/svg-pan-zoom.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// svg-pan-zoom v3.5.1
// svg-pan-zoom v3.5.2
// https://github.com/ariutta/svg-pan-zoom
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
var svgPanZoom = require('./svg-pan-zoom.js');
Expand Down Expand Up @@ -1759,25 +1759,22 @@ module.exports = {
* @param {SVGSVGElement} svg
*/
, mouseAndTouchNormalize: function(evt, svg) {
// If no cilentX and but touch objects are available
// If no clientX then fallback
if (evt.clientX === void 0 || evt.clientX === null) {
// Fallback
evt.clientX = 0
evt.clientY = 0

// If it is a touch event
if (evt.changedTouches !== void 0 && evt.changedTouches.length) {
// If touch event has changedTouches
if (evt.changedTouches[0].clientX !== void 0) {
evt.clientX = evt.changedTouches[0].clientX
evt.clientY = evt.changedTouches[0].clientY
}
// If changedTouches has pageX attribute
else if (evt.changedTouches[0].pageX !== void 0) {
if (evt.touches !== void 0 && evt.touches.length) {
if (evt.touches[0].clientX !== void 0) {
evt.clientX = evt.touches[0].clientX
evt.clientY = evt.touches[0].clientY
} else if (evt.touches[0].pageX !== void 0) {
var rect = svg.getBoundingClientRect();

evt.clientX = evt.changedTouches[0].pageX - rect.left
evt.clientY = evt.changedTouches[0].pageY - rect.top
evt.clientX = evt.touches[0].pageX - rect.left
evt.clientY = evt.touches[0].pageY - rect.top
}
// If it is a custom event
} else if (evt.originalEvent !== void 0) {
Expand Down
Loading

0 comments on commit f324a9d

Please sign in to comment.