Signature Field. No valueChange event when changing backgroundColor, color or strokeWidth.

1 Answer 20 Views
Signature
Valentyn
Top achievements
Rank 1
Valentyn asked on 11 Mar 2024, 03:15 PM
All settings that affect the appearance("backgroundColor", "color" or "strokeWidth") of the signature must be applied before you start drawing the signature. If you apply the parameters for changing the appearance of the signature after the signature is drawn, the value does not change and the "valueChange" event is not triggered. However, the changes are applied to the signature canvas. How can I fix this?

1 Answer, 1 is accepted

Sort by
0
Hetali
Telerik team
answered on 12 Mar 2024, 09:08 PM

Hi Valentyn,

The valueChange event of the Kendo UI Signature component is triggered when there are changes made in the signature drawing itself. To trigger an event when the value of the Appearance changes, use the valueChange event of the DropDownList component or the valueChange event of the ColorPicker component.

For example:

<kendo-colorpicker 
  [(value)]="backgroundColor" 
  (valueChange)="bgColorChange($event)">
</kendo-colorpicker>

<kendo-dropdownlist
  [(value)]="strokeWidth"
  (valueChange)="strokeWidthChange($event)">
</kendo-dropdownlist>

<kendo-signature
  (valueChange)="valueChange($event)">
</kendo-signature>

In this StackBlitz example, I have added valueChange events in the respective components.

I hope this helps. Please let me know if I can further assist you.

Regards,
Hetali
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Valentyn
Top achievements
Rank 1
commented on 13 Mar 2024, 10:40 AM

Hi. Thank You for your answer.

But the main question is now to get an updated signature value after changing color, strokeWidth, or backgroundColor? The signature value doesn't update after these changes.

Martin Bechev
Telerik team
commented on 18 Mar 2024, 07:49 AM

Hi Valentyn,

I am not sure that understand the issue correctly. Each Kendo UI for Angular component (DatePicker, ColorPicker, Signature, etc.) has predefined supported events that can be checked in the API of the respective component (SignatureComponent, DatePickerComponent, ColorPickerComponent, etc).

Regarding the colors, pass the signature referecenace to the handler:

<kendo-colorpicker [(value)]="color" (valueChange)="colorChange($event, signature)">
</kendo-colorpicker>

And access the color:

    public colorChange(e, signature: SignatureComponent) {
        console.log(signature.color);
    }

 

Tags
Signature
Asked by
Valentyn
Top achievements
Rank 1
Answers by
Hetali
Telerik team
Share this question
or