title: Konva - Using Rotate and keeping within bounds
body: <p>I am using Konva to create an area on a webpage. I create a dragBoundFunc function for my rectangle checking pos.x and pos.y and width of canvas and rect and this works fine - the rectangle only stays in this area as I want it to when dragged.</p>
  
  <p>My problem comes when I rotate the rectangle 90 degrees. Now width is less than height when I check getClientRect().width and getClientRect().height which is expected but it now won't drag all the way to the end of my canvas unless I detect end of rotation and change my shapes offsetY value to 65 and then it works fine.</p>
  
  <p>Is changing offsetY and offsetX after rotation the right approach to fix this problem and how do I calculate what to set them to if yes?</p>
  
  <pre><code>           dragBoundFunc: function(pos) {
          var iw = 600 - (my_shape.getClientRect().width);
          var ih = 400 - my_shape.getClientRect().height;
          var newX = pos.x &gt; iw  ? iw : pos.x;
          var newY = pos.y &gt; ih ? ih : pos.y;
          return {
              x: newX &gt; 0 ? newX : 0,
              y: newY &gt; 0 ? newY : 0
          };
  
      }
  </code></pre>