shapeMouseEnter/Leave problems

2 posts, 0 answers
  1. Matjaž
    Matjaž avatar
    81 posts
    Member since:
    Jul 2015

    Posted 24 Apr Link to this post

    shapeMouseEnter and Leave events are sometimes called, but not always. To repeat this bug, just drag mouse over squares. Sometimes it is painted and sometime it is not.

    dojo

  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 27 Apr Link to this post

    Hello,

    This is an SVG-specific behavior caused by the lack of fill on these shape. It can be resolved by applying a fully transparent fill:
    style: {
        fill: {
            color: "#fff",
            opacity: 0
        }
    }

    Same for the toggling code. Here we're using the fill(color, opacity) function:
            shapeMouseEnter: function(e) {
              e.shape.fill("#339fc3", 1);
            },
            shapeMouseLeave: function(e) {
              e.shape.fill("#fff", 0);
            }

    See the updated snippet. I'll add this to the documentation for future reference.

    Regards,
    T. Tsonev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top