title: KineticJS: Rotate line around point
body: <p>I'm trying to rotate a line around a point using KineticJS. But the line always rotates around the origin. I already tried using a offset, but it didn't work either. </p>
  
  <p>The black point is normally positionable. I want the gray line to rotate in angles between 0 and 360 around the black point.</p>
  
  <pre><code>line.setPoints([{
      x: stage.getWidth() / 2,
      y: stage.getHeight() / 2
  }, {
      x: stage.getWidth() / 2,
      y: stage.getHeight() / 2 - 30
  }]);
  
  line.transitionTo({
      rotation: angle,
      duration: 1,
      easing: 'ease-out'
  });
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>I made a fiddle: <a href="http://jsfiddle.net/QuT4d/" rel="nofollow">http://jsfiddle.net/QuT4d/</a></p>