Open jjhesk opened 11 years ago
Set a transparent div over the top with same height/width as canvas using CSS absolute positioning after script div, toggle visibility with javascript, add a radio input to allow user control.
Add this
, 'stopStroke' : function() {
var obj = this.find('canvas.'+apinamespace)
.add(this.filter('canvas.'+apinamespace))
.data(apinamespace+'.this');
obj.stopStroke = true;
}
, 'startStroke' : function() {
var obj = this.find('canvas.'+apinamespace)
.add(this.filter('canvas.'+apinamespace))
.data(apinamespace+'.this');
obj.stopStroke = false;
}
After
// there will be a separate one for each jSignature instance.
, 'events' : function() {
return this.find('canvas.'+apinamespace)
.add(this.filter('canvas.'+apinamespace))
.data(apinamespace+'.this').events
}
And this
if (jSignatureInstance.stopStroke && (jSignatureInstance.stopStroke==true)) {
return false;
}
In the beggining of
this.drawStartHandler = function(e) {
// ADD HERE
e.preventDefault()
// for performance we cache the offsets
// we recalc these only at the beginning the stroke
setStartValues()
jSignatureInstance.dataEngine.startStroke( getPointFromEvent(e) )
timer.kick()
}
And then you start/stop
sig.jSignature("stopStroke");
or
sig.jSignature("startStroke");
how do you stop or unbind the touching area.. like when you hit the confirm button it will stop letting the drawings to be continue.