Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Line without click handler absorbing clicks

    I am using SmartGWT LGPL build 2025-01-14.

    I have two lines which partially overlap.

    The line in back has a click handler but the line in front does not.

    When I click on the parts of the back line which are visible, it gets a click event.

    If I click on the part of the front line which is overlapping the back line, I get no click events on the back line.

    It seems to me that since the front line does not have a click handler, it should not be involved in clicks.
    Then, the click should occur on whatever is behind it.

    Please see the attached test case.
    Attached Files

    #2
    Sorry, as with HTML and with substantially all UI toolkits, the target of an event is not influenced by the presence of absence of a handler method.

    This is, in part, because event handling is sometimes done centrally (e.g. on a parent), so the event target must be correct.

    Comment


      #3
      Is there a way to add a handler which can tell the toolkit to pass it to the next item?

      Comment


        #4
        Well, you can add a click handler and call the same logic that would have been called if the click event had hit the other DrawLine.

        Comment


          #5
          Originally posted by Isomorphic View Post
          you can add a click handler and call the same logic that would have been called if the click event had hit the other DrawLine.
          I guess I am going to have to do that. It is not as simple as one line overlapping another, there are several objects which overlap. But, I should be able to do it in my code.
          Thanks for the advice.

          Comment

          Working...
          X