Need More Info
Last Updated: 08 Mar 2023 11:15 by ADMIN
Sudip
Created on: 01 Mar 2023 15:35
Category: Kendo UI for jQuery
Type: Feature Request
0
Diagram shape attribute and event handlers

Diagram shapes get converted into SVG elements such as Path, Text, Image, or group (g) tags. These tags support the primary HTML event handlers (such as on click) and other attributes. It becomes essential to add a hiddle sibling with identification to work around this limitation.

var fooText = new KD.TextBlock({ x: fooX, y: fooY, text: textFromDb, id: uniqueIdBasedOnDataFromDb, // This ID (or another property "domId") should become the Id in the HTML onclick: someMethod,
customAttributeA: valueAFromDb,
customAttributeB: valueBFromDb}); barGroup.append(fooText);

1 comment
ADMIN
Georgi Denchev
Posted on: 08 Mar 2023 11:15

Hello, Sudip,

Could you please provide me with a bit more information about the request?

The Diagram already supports the "click" event on shapes:

https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/diagram/events/click 

The event works for both shapes and connections. The type of the shape(Path, Text, Image) is of no concern.

Best Regards,
Georgi Denchev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.