Skip to content

Commit 3bccc59

Browse files
committed
fix bug in drag implementation on mobile devices
1 parent fe2ff24 commit 3bccc59

File tree

6 files changed

+11
-6
lines changed

6 files changed

+11
-6
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,5 @@ Changed to using css transform to scale and translate image for better performan
191191
Minimum IE supported is now IE 9 - stick with version 0.6 if you need IE 8 support.
192192
Updated Grunfile.js to include tests against latest version (2.1.0) of jQuery.
193193
### 0.71
194-
Add zoomable option allowing user to disable zooming
194+
Add zoomable option allowing user to disable zooming
195+
Fix bug in drag implementation on mobile devices

dist/imgViewer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery imgViewer - v0.7.0 - 2014-06-19
1+
/*! jQuery imgViewer - v0.7.1 - 2014-06-22
22
* https://github.com/waynegm/imgViewer
33
* Copyright (c) 2014 Wayne Mogg; Licensed MIT */
44
/*
@@ -197,6 +197,7 @@
197197
ev.preventDefault();
198198
self.options.zoom = self.pinchzoom * ev.scale;
199199
stopRenderLoop();
200+
self.update();
200201
}
201202
});
202203

@@ -224,6 +225,7 @@
224225
self.vCenter.x = self.dragXorg - ev.deltaX/self.options.zoom;
225226
self.vCenter.y = self.dragYorg - ev.deltaY/self.options.zoom;
226227
stopRenderLoop();
228+
self.update();
227229
}
228230
});
229231

dist/imgViewer.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

imgViewer.jquery.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "imgViewer",
33
"title": "jQuery imgViewer",
44
"description": "jQuery plugin to zoom and pan images, even those with a size that is a percentage of their container.",
5-
"version": "0.7.0",
5+
"version": "0.7.1",
66
"homepage": "",
77
"author": {
88
"name": "Wayne Mogg"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jquery-imgViewer-plugin",
3-
"version": "0.7.0",
3+
"version": "0.7.1",
44
"engines": {
55
"node": ">= 0.8.0"
66
},

src/imgViewer.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@
202202
ev.preventDefault();
203203
self.options.zoom = self.pinchzoom * ev.scale;
204204
stopRenderLoop();
205+
self.update();
205206
}
206207
});
207208

@@ -229,6 +230,7 @@
229230
self.vCenter.x = self.dragXorg - ev.deltaX/self.options.zoom;
230231
self.vCenter.y = self.dragYorg - ev.deltaY/self.options.zoom;
231232
stopRenderLoop();
233+
self.update();
232234
}
233235
});
234236

0 commit comments

Comments
 (0)