title: clear out the complete signature in one click
body: <p>I am using <a href="https://willowsystems.github.io/jSignature/#/about/" rel="nofollow noreferrer">jSignature</a> on my web page. This jquery plugin deletes one stroke at a time. I want behavior of "Undo last stroke" to clear out the complete signature in one click.</p>
  
  <p>I have changed the style of "Undo last stroke" to style of close button. So in my <code>jSignature.UndoButton.js</code>, the style code of "Undo last stroke" button is like below:</p>
  
  <pre><code>var undoButtonSytle = 'position:relative;display:none;float: right;margin-right: 5px;outline:0;cursor: pointer;color: rgb(218, 216, 217);font-size: 1.5em;'
                              , $undoButton = $('&lt;i class="fa fa-window-close" style="'+undoButtonSytle+'" aria-hidden="true"&gt;&lt;/i&gt;').append('&lt;link rel="stylesheet" href="../../css/font-awesome.css" type="text/css" /&gt;')
                                  .appendTo(this.$controlbarLower) 
  </code></pre>
  
  <p>Undo function from <code>jSignature.UndoButton.js</code> (there is more code in this file)</p>
  
  <pre><code>function attachHandlers(buttonRenderer, apinamespace, extensionName) {
      var $undoButton = buttonRenderer.call(this)
  
      ;(function(jSignatureInstance, $undoButton, apinamespace) {
          jSignatureInstance.events.subscribe(
              apinamespace + '.change'
              , function(){
                  if (jSignatureInstance.dataEngine.data.length) {
                      $undoButton.show()
                  } else {
                      $undoButton.hide()
                  }
              }
          )
      })( this, $undoButton, apinamespace )
  
      ;(function(jSignatureInstance, $undoButton, apinamespace) {
  
          var eventName = apinamespace + '.undo'
  
          $undoButton.bind('click', function(){
              jSignatureInstance.events.publish(eventName)
          })
  
          // This one creates new "undo" event listener to jSignature instance
          // It handles the actual undo-ing.
          jSignatureInstance.events.subscribe(
              eventName
              , function(){
                  var data = jSignatureInstance.dataEngine.data
                  if (data.length) {
                      data.pop()
                      jSignatureInstance.resetCanvas(data)
                  }
              }
          )
      })( 
          this
          , $undoButton
          , this.events.topics.hasOwnProperty( apinamespace + '.undo' ) ? 
              // oops, seems some other plugin or code has already claimed "jSignature.undo" event
              // we will use this extension's name for event name prefix
              extensionName :
              // Great! we will use 'jSignature' for event name prefix.
              apinamespace
      )
  }
  </code></pre>
  
  <p>I am not very known with Jquery. Can anyone please tell me how should I should I achieve clearing sign in one stroke?</p>