SHARE
TWEET

Untitled

a guest Oct 11th, 2012 376 Never
  1. Zoom a layer at the point of click with kineticjs
  2. image_part.on('click', function(evt){
  3.     zoom += 0.1;
  4.     var offset = layer.getOffset();
  5.     layer.setOffset(evt.pageX, evt.pageY);
  6.     layer.setScale(zoom);
  7.     layer.setX(evt.pageX);
  8.     layer.setY(evt.pageY);
  9.     layer.draw();
  10. });
RAW Paste Data
Top