Announcement

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

    #16
    Any update on this?

    Comment


      #17
      It's queued to be looked at.

      But, taking a step back, can you confirm what you're actually trying to do?

      If you want to output entirely custom content anyway, and do something special on rollover, it's probably best to:

      1) extend your custom tile from Canvas or a Layout, rather than SimpleTile, which has internal logic attached - add child content and install mouseOver and mouseOut handlers to show/hide your rollover canvas
      2) set the tileConstructor, but don't install createTile() code - the grid will create instances of your tile class via the autoChild system

      Doing this should avoid internal rollover-code specific to SimpleTiles.

      Comment


        #18
        Hi Isomorphic! Back in business... I hope you missed me :) Your suggestions have nothing to do with the flickering issue. This happens because the rollOverCanvas that I show() on mouseOver the tile immediately generates a mouseOut for the tile probably because the rollOverCanvas is not a child of the tile (based on your suggestion so that I can place it wherever I want over the tile). Then for that mouseOut for the tile I hide() the rollOverCanvas and this generates back a mouseOver for the tile which show the rollOverCanvas and so on... for each mouse move, thus the effect of flicker. I hope I am clear now. I am curious how it is implemented the rollOverCanvas functionality for a ListGrid since it does not flicker.

        Update: I just tested with a Canvas instead of SimpleTile and the same problem behavior occurs. What next?
        Last edited by slick07; 29th Apr 2020, 05:54.

        Comment


          #19
          Sorry, but as best we can tell you seem to be describing a logic bug in your code? If you are going to put a "rollOverCanvas" under the mouse, then whatever the mouse was over before will receive a mouseOut - this is correct framework behavior.

          If you are reacting to that mouseOut and not checking that the mouse is over your rollOverCanvas, well, that's just a bug you should fix.

          Comment


            #20
            Solved! Thank you. Now what can be done regarding the mouse over style of the SimpleTile? It is no longer active when the mouse is over the rollOverCanvas. Probably because the rollOverCanvas is not a child of the current tile??

            Comment


              #21
              Right, the tile is not in the over state because the mouse is not over the tile. That's how the over state works in general and is also not a bug.

              If you want the tile to show some styling when the mouse is over it *or* if the mouse is over another element, that's going to be up to your logic, as it is not the standard notion of mouseOver. So you just call setStyleName() when you want the style applied, and setStyleName() to go back to normal when you don't want it applied.

              Comment


                #22
                OK...I done that BUT there are still issues. For example if I am with the mouse over the rollOverCanvas and move it very very fast outside of the tile grid I am no longer receiving any mouseOut or mouseOver events for the tile. Hence the rollOverCanvas remains visible and so does the tileOver style because I no longer know when to hide them because I am not notified.

                The above misbehavior does not happen with the standard rollOverCanvas for a ListGrid. So could you pleeease tell me how is the rollOverCanvas mechanism implemented in there so I can implement it for TileGrid? Or where can I see how it is implemented?

                Comment


                  #23
                  We are using the same mouse events you are.

                  Moving the current fast does not mean that mouseOuts don’t happen - that’s unintentionally hilarious actually - but perhaps you are not listening for mouseOut on your rollover canvas, and trying to rely on mouseOut on the tile only? The surrounding tile will not get a mouseOver/mouseOut sequence if the cursor is moved quickly.

                  Comment


                    #24
                    Your explanation is accurate and logical. Don't thing I haven't taken it into consideration. But it does not happen on the ListGrid and I am doing the same thing. Unless you are adding all kind of mouse listeners to the provided rollOverCanvas and all its children to detect any type of mouse action a.s.o That is why I asked where can I see how it is implemented for the ListGrid so I do not have to reinvent the wheel.

                    Comment


                      #25
                      The framework is open source, so you have always been free to look at that implementation. But it works as we say it does, so a big shortcut would be to simply follow the advice we just gave you.

                      Comment


                        #26
                        Has anything changed from 12 to 12.1 related to TileGrid? I am running the above provided TestCase and in 12.1 when the mouse is pressed on the tile the style disappears.

                        Comment


                          #27
                          If you mean the tile appears I styled, that would indicate you’ve got the down state enabled for whatever you’re using as a tile, but there is no Down variant of the style defined.

                          Comment


                            #28
                            I am extending SimpleTile. Probably starting with 12.1 the default value for showDown property changed to true because I was not setting anything. Putting it to false solved the problem. Thanks!

                            Comment

                            Working...
                            X