vue-signature icon indicating copy to clipboard operation
vue-signature copied to clipboard

size Pen

Open rool80 opened this issue 3 years ago • 2 comments

Hi,

how can i change the thickness of the pen?

thx

rool80 avatar Jan 07 '22 14:01 rool80

I updated VueSignature.vue

Now, how use it.(minWidth,maxWidth) Example:

<vueSignature
  ref="signature"
  :sigOption="signOpt"
  color-format="hex"
  :w="canvas_width + 'px'"
  :h="canvas_height + 'px'">>
</vueSignature>

data () {
    return {
      canvas_width: 875, // sirka canvas podpisu
      canvas_height: 350, // vyska canvas podpisu
      signOpt: {
        penColor: '#000cff',
        backgroundColor: 'rgb(255,255,255,0)',
        minWidth: 2.2, <---- min width pen
        maxWidth: 4.4 <---- max width pen
      },
    }
}

vueSignature.vue.zip

rool80 avatar Jan 08 '22 12:01 rool80

You can set pen size options during initialization:

signOpt: {
        penColor: '#000cff',
        backgroundColor: 'rgb(255,255,255,0)',
        minWidth: 2.2, <---- min width pen
        maxWidth: 4.4 <---- max width pen
      }

or during runtime(if you use vuesignature local file):

_this.sig.minWidth = 5;
_this.sig.maxWidth = 10;

WangShayne avatar Jan 11 '22 01:01 WangShayne