mouseEnter

Fired when the mouse enters a shape or a connection.

Will not fire for disabled items.

Available in version 2014.3.1307 and later

Event Data

e.item kendo.dataviz.diagram.Shape | kendo.dataviz.diagram.Connection

The target shape or connection.

e.sender kendo.dataviz.ui.Diagram

The diagram instance which fired the event.

Example - handling the mouseEnter event

<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    shapes:[
      {
        id:"1",
        content:{
          text: "State 1"
        },
        x: 20,
        y: 20
      },
      {
        id:"2",
        content: {
          text: "State 2"
        },
        x: 160,
        y: 20
      }
    ],
    connections:[
      {
        from: "1",
        to: "2"
      }
    ],
    mouseEnter: onMouseEnter
  });

  function onMouseEnter(e){
    if(e.item instanceof kendo.dataviz.diagram.Shape){
/* The result can be observed in the DevTools(F12) console of the browser. */
      console.log("Hovered shape: " + e.item);
    }
    else {
/* The result can be observed in the DevTools(F12) console of the browser. */
      console.log("Hovered connection: " + e.item);
    }
  }
</script>
In this article