willowsystems / jSignature

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

How to change width? #80

Open gongqiyi opened 7 years ago

gongqiyi commented 7 years ago

image

nikonov91-dev commented 5 years ago

you might look at the beginning of jSignature.min.noconflict and see the set default values named as d with width, height and ratio of the input. I recommend to use the ratio, not hardcoded width/height

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 you need to initialise jSign with elem.jSignature({sizeRatio: 1});