Questions tagged [pinch]

237 questions
4
votes
1 answer

Hammer.js fires extraneous pinchin/pinchout events

Using this code in the JS pannel of the CodePen sample: var myElement = document.getElementById('myElement'); var mc = new Hammer.Manager(myElement); var pinch = new Hammer.Pinch({threshold: 0}); mc.add([pinch]) mc.on("pinch pinchin pinchout…
Fabrice
  • 41
  • 4
4
votes
1 answer

scaling image on pinch gesture

I'm using the jQuery touchy plugin for detecting the pinch event to give users the ability to zoom in/out on an image. Here's the gist of my code: var w = 800, h = 600; $('img').on('touchy-pinch', function (e, $target, data) { …
paul smith
  • 1,327
  • 4
  • 17
  • 32
3
votes
0 answers

PinthToZoom and Pan of UIView with multiple images

I'm developing an iphone application with an UIView that have an image as a background and multiple buttons with image as background. The image is an image of a country and the buttons are the regions/states of that country. The problem is that the…
3
votes
2 answers

How to find when a tableView cell is touched or pinched in iphone?

I have a tableView completed fill on view. when i tapped on a cell tableView:didSelectRowAtIndexPath: is getting fired, but when i wrote touchesBegan:withEvent to find touch and Pinch events of a tableView it was not fired. Tableview is above the…
User-1070892
  • 929
  • 10
  • 16
3
votes
2 answers

How "Our Choice" app does the pinch and enlarge to view content part?

The said app can be seen here: http://pushpoppress.com/ourchoice/. What interests me is the part where they can freely pinch the thumbnails at the bottom to enlarge to full view. Would be interesting to replicate such effect. Any ideas guys?
wahkiz
  • 616
  • 5
  • 13
3
votes
1 answer

How to get the scaled width/height in imageview after postscale()

I have a code which allow user to pinch-zoom some images on the screen. I use AbsoluteLayout and imageviews to display the images. In order to achieve this, I made those imageviews have full width/height to its parent. Then when user touch a point,…
robotijo
  • 41
  • 1
  • 4
3
votes
2 answers

Using Google Maps Javascript API pinch-to-zoom on my own image

I'm trying to create a mobile-friendly web page that will allow a user to drag an around in a
. I've got this working using the image.ontouchstart method. Now I want to make it so the user can pinch-to-zoom when viewing this from an iOS…
lhan
  • 4,585
  • 11
  • 60
  • 105
3
votes
2 answers

UIPinchGestureRecognizer not responding

I have a universal binary application and currently working on the iPad version of the application. The iPad is using a uitabbarcontroller and on the second tab I have 6 images and when adding a UIPinchGesture it is not responding. I have…
dbslone
  • 2,014
  • 2
  • 19
  • 26
3
votes
1 answer

Windows Phone Map control has unresponsive pinch zoom

I'm seeing very spotty/unresponsive behavior with the silverlight map control on Windows Phone 7 (Microsoft.Phone.Controls.Map). The map control doesn't seem to pick up a lot of my pinch gestures. Is anyone else seeing this? Is there a way a…
Sonny Saluja
  • 7,193
  • 2
  • 25
  • 39
3
votes
2 answers

Zooming in unity mobile

I'm trying to zoom in and out in my game with a zoom limit. I'm using this code to scroll and pinch but I didn't figure out how to limit the zoom distance (minzoomlimit and maxzoomlimit). I mean when the player wants to zoom in he can zoom for a…
Gara
  • 143
  • 1
  • 4
  • 12
3
votes
0 answers

iOS 12 safari can not prevent pinch scale with "touchmove" eventlistener when scrolling

I add this code document.addEventListener('touchmove', function(event) { if (event.touches.length > 1) { event.preventDefault(); event.stopPropagation(); } }, { passive: false }); It worked when you don't move your page.…
mania_U
  • 63
  • 4
3
votes
0 answers

How to pan and then immediately pinch with hammer js?

I'm using hammerjs like this this.hammer = new Hammer.Manager(this.canvas); const pinch = new Hammer.Pinch(); const pan = new Hammer.Pan({ threshold: 5, }); this.hammer.add([pinch, pan]); But if I start panning I can't do a pinch. When I mean pan…
Totty.js
  • 15,563
  • 31
  • 103
  • 175
3
votes
3 answers

is possible to zoom in/out a UIImageView in custom cell of a UICollectionView only when pinch the cell's imageView?

I have a CollectionView that have one custom cell. I want to zoom in/out imageView in cell, so i add pinch gesture at CollectionView.m when i add gesture to self.collectionView, like this: [self.collectionView addGestureRecognizer:pinchGesture]; it…
3
votes
0 answers

How can I adjust my image position after I change the anchor point? (Swift)

I am using UIGestureRecognizer to make the pinch action and I need to change the anchor point to resize to the correct point of my UIImage. After I change the anchor point, the image moves a little bit, and I need to put it back to the origin. Here…
Ami Garcia
  • 31
  • 3
3
votes
2 answers

Uiwebview refreshes after zoom and pinch

I have a uiwebview in my App. So far everything works fine, but when i zoom in or out for example the uiwebview refreshes the loaded page and then scrolls and zooms to the new page location and size. So the zooming works good, but I don't want the…
Dominik
  • 31
  • 3