Question: I am using Kinetic JS on iPhone and Android.

I copied the example from 

<http://www.html5canvastutorials.com/labs/html5-canvas-multi-touch-scale-stage-with-kineticjs/>

to enable stage scaling and then I realized that when I zoom the zooming does not occur on the place where I pinch my zoom at, instead it happens at the top corner. 

I also need to limit the zoom rate with a max/min zoom level, I believe this would help a lot.. thanks!

Code:

<http://pastebin.com/cAgk2UiB>

Modded Pinch Layer:

<http://pastebin.com/mG1b75KK>

Answer: 
This was taken care of by another developer who made a plugin. Try this out and see if it works for you 

<https://github.com/eduplus/pinchlayer>
Here is the updated version of the tutorial: <http://jsfiddle.net/9eaBq/>

Just replace lines from 69 to 71 by this code:

```
var scale = {
  x: stage.scale().x * dist / lastDist,
  y: stage.scale().y * dist / lastDist
};
stage.scale(scale);

```

Working on an iPad (Chrome & Safari) under iOS7.