willowsystems / jSignature

jQuery plugin - draw signature in browser.
720 stars 266 forks source link

Is it possible to change stroke size and color? #60

Open abnersouza opened 9 years ago

abnersouza commented 9 years ago

Hi guys,

Someone knows if is possible to change set the color of the stroke, and also make the line thicker when i initialise the Jsignature or after initialise?

Thanks

gerabu commented 6 years ago

the color is inherited from its container

nhossaincse commented 6 years ago

How to change the thickness of the ink?

nikonov91-dev commented 5 years ago

you might look at the beginning of jSignature.min.noconflict and see the set default value named in d as lineWidth. But i havnt found the stroke color unfortunately

function r(b, j, a) { var g = this.$parent = $(b), b = this.eventTokens = {}; this.events = new v(this); var c = $.fn[e]("globalEvents"), d = { width: "ratio", height: "ratio", sizeRatio: 4, color: "#000", "background-color": "#fff", "decor-color": "#eee", lineWidth: 0, minFatFingerCompensation: -10, showUndoButton: !1, data: [] };

hence your code will be like this: elem.jSignature({sizeRatio: 1, lineWidth: 0.5});