Change InkSketch InkColor
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Hello!
Simply use this code and don't forget to change CSS class to the class of your InkSketch control:
Simply use this code and don't forget to change CSS class to the class of your InkSketch control:
Code: Select all
$(".CSSclass").attr("fd_inkcolor", "#ff0000");
Cheers
I used your code and it works. I can watch the dom in the browser and the fd_inkcolor is changing but when I draw on the control it still only draws in black. Is there something else I need to do for the ink color change to take effect?
City of Nampa
Idaho
United States of America
Idaho
United States of America
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Yes, the code indeed doesn't change the pen color dynamically, it only applies when the canvas is being created.
In order to change it dynamically, please use:
In order to change it dynamically, please use:
Code: Select all
var signaturePad = $('.CSSclass').data('signaturePad');
signaturePad.penColor = 'rgb(66, 133, 244)';
Cheers
-
- Information
-
Who is online
Users browsing this forum: No registered users and 3 guests