Skip to content

Commit

Permalink
Merge pull request #3 from spekary/feature-DrawEvent
Browse files Browse the repository at this point in the history
feature-DrawEvent
  • Loading branch information
olegabr committed Aug 8, 2016
2 parents b07d771 + 453a22e commit 20523eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions includes/QSignaturePadGen.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
namespace QCubed\Plugin;
use \QType, \QApplication, \QInvalidCastException, \QCallerException, \QBlockControl;

class QSignaturePadEndEvent extends \QEvent {
const EventName = 'qsigend';
}

class QSignaturePadGen extends QBlockControl {
/** @var string HTML tag to be used by the control (such as div or span) */
protected $strTagName = 'canvas';
Expand All @@ -28,6 +32,7 @@ protected function getJsObjectString() {
window[id] = signaturePad;
signaturePad.onEnd = function() {
qcubed.recordControlModification("$strControlId", "_Value", window[id].toDataURL());
\$j('#{$strControlId}').trigger('qsigend');
}
}
return window[id];
Expand Down

0 comments on commit 20523eb

Please sign in to comment.