title: How to get a certain Croppie JavaScript to rotate using buttons
body: <p>I am trying to get a Croppie Script to rotate using buttons. It does not work with this particular script due to what appears to be a different syntax or something. I am not an avid JavaScript coder. But the below code is what I have and trying to get rotation using button to work. So far no good! Oh! I have enabled the Orientation by default in croppie.js because due to the syntax I did not know how to add it within the script below, just in case you are wondering.</p>
  
  <pre><code>$( document ).ready(function() {
  
      var $uploadCrop = $('#upload-demo');
  
          $uploadCrop.croppie({
              viewport: {
                  width: 450,
                  height: 450,
                  type: 'square'
              },
              boundary: {
                  width: 500,
                  height: 500
              }
          });
          $uploadCrop.croppie('bind', 'imgs/cat.jpg');
  
  
          $('.vanilla-rotate').on('click', function(ev) {
              vanilla.rotate(parseInt($(this).data('deg'))); //&lt;-------
          });
  
  
      $('.upload-result').on('click', function (ev) {
          $uploadCrop.croppie('result', {
              type: 'canvas',
              size: 'original'
          }).then(function (resp) {
              $('#imagebase64').val(resp);
              $('#form').submit();
          });
      });
  
  });
  </code></pre>
  
  <p>It seems to me that the line where I have comment out arrow is the problem. But I could be wrong.</p>
  
  <p>I have a button on html page as </p>
  
  <pre><code>&lt;button class="vanilla-rotate" data-deg="-90"&gt;Rotate&lt;/button&gt;
  </code></pre>
  
  <p>Their Vanilla demo has the rotating feature but I am trying to get it to work on the Upload demo where they do not have rotation feature.</p>