brinley / jSignature

jQuery plugin for adding web signature functionality
http://www.unbolt.net/jSignature
696 stars 529 forks source link

Uncaught Error: Method updateSetting does not exist on jQuery.jSignature #69

Closed marco-nembrot closed 8 years ago

marco-nembrot commented 10 years ago

Trying to use "updateSetting" to change on live settings like line width or the pen color. I tried var $sigdiv = $("#signature").jSignature(); $sigdiv.jSignature("updateSetting", "lineWidth", 100, true); $sigdiv.jSignature.updateSetting("lineWidth", 100, true); $sigdiv.jSignature("updateSettings", "lineWidth", "100", true);

but nothing seems to work. What do I miss ? Thanks for replying.

Z.

brinley commented 10 years ago

Do you have a sample? updateSettings does not change colors or width of existing strokes, it sets it for future strokes.

On Fri, Oct 10, 2014 at 3:33 AM, NEMBROT Isabelle notifications@github.com wrote:

Trying to use "updateSetting" to change on live settings like line width or the pen color. I tried var $sigdiv = $("#signature").jSignature(); $sigdiv.jSignature("updateSetting", "lineWidth", 100, true); $sigdiv.jSignature.updateSetting("lineWidth", 100, true); $sigdiv.jSignature("updateSettings", "lineWidth", "100", true);

but nothing seems to work. What do I miss ? Thanks for replying.

Z.

— Reply to this email directly or view it on GitHub https://github.com/brinley/jSignature/issues/69.

Brinley Ang Software Developer & Consultant http://www.unbolt.net

marco-nembrot commented 10 years ago

Thanks for answering that fast ! Here my sample. I did understand that the changes are made for the future strokes which is exactly what I want. Users should have the choice of changing settings if the default does not go with them.

var $sigdiv = $("#signature").jSignature({ "UndoButton" : true, "showUndoButton": true, "height" : "100%", "width" : "100%", "signatureLine" : false }); $("#canvas-width").on("click", function(e) { $sigdiv.jSignature("updateSetting", "lineWidth", 100, true); });

brinley commented 10 years ago

Sorry for the late response, try this instead

$("#canvas-width").on("click", function(e) { $("#signature").jSignature("updateSetting", "lineWidth", 100, true); });

On Mon, Oct 13, 2014 at 6:42 PM, NEMBROT Isabelle notifications@github.com wrote:

Thanks for answering that fast ! Here my sample. I did understand that the changes are made for the future strokes which is exactly what I want. Users should have the choice of changing settings if the default does not go with them.

var $sigdiv = $("#signature").jSignature({ "UndoButton" : true, "showUndoButton": true, "height" : "100%", "width" : "100%", "signatureLine" : false }); $("#canvas-width").on("click", function(e) { $sigdiv.jSignature("updateSetting", "lineWidth", 100, true); });

— Reply to this email directly or view it on GitHub https://github.com/brinley/jSignature/issues/69#issuecomment-58856887.

Brinley Ang Software Developer & Consultant http://www.unbolt.net