Announcement

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

  • #16
    Well, i wrote in post#9 that i tried to set overflow hidden in all the components in the test, through Java. Didn't work, but maybe you thought of something else?

    Comment


    • #17
      After a very long night, i have managed to get my test case from the first post in this thread working in 5.1. As suspected, it was something with the resizing and the resizehandler i had registered.



      After the latest 5.0 release and 5.1, where my map widget stopped working, the map initially didn't draw properly, nor did the resize handler work:



      1. Setting the layout to a fixed width/height had stopped making the map size properly initially. I guess because size events no longer propagates all the way down to the MapWidget for some reason. Also since that made the
      resizedhandler never being called, it was an issue.

      Code:
      mapLayout.setHeight(200);
      mapLayout.setWidth(200);
      In the end, i changed the layout to setWidth100 and setHeight100 which made the handler being called again

      EDIT: i forgot that i could make it draw initially by calling mapLayout.setPixelsize(200,200) manually also made the map draw again. So something has changed regarding how children are being called on setheight/width i guess.

      2. The resized handler setSize no longer worked as per below.
      Code:
      addResizedHandler(new ResizedHandler() {
                  public void onResized(ResizedEvent e) {
                      map.setSize(getWidth().toString(), getHeight().toString());
                      map.triggerResize();
                  }
              });


      After changing the setsize row to:
      Code:
      map.setPixelSize(getWidth(), getHeight());
      As per the initial draw above, it finally started working again in latest 5.0 and 5.1, for unknown reasons. As you can see, i didn't have to change overflow anywhere.

      I still don't know exactly why i had to change this to make it work, and most importantly, why an incremental upgrade within a release can break such functionality, but what do i know.

      Thanks for all your support and kind words.
      Last edited by mathias; 15th Jun 2016, 23:56.

      Comment


      • #18
        Good job solving your issue on your own.

        It looks like your code was depending on a Resize event that should not actually fire: if a component is given a size and simply drawn, a Resize event should not fire since no resize has occurred. The only exception is a component that overflows its specified size.

        So what may have happened here is that a spurious resize event was eliminated by a bugfix, and this broke your code that was depending on a bug.

        However there's no checkin in the date range you indicated that could have had this effect. So that's still a mystery.

        Note you should be using overflow:hidden, since you don't want the auto-sizing behavior of overflow:visible. Leaving overflow:visible active can only slow things down, and might cause issues (for example, if the maps component draws something outside of the bounding box, your widget might grow to show it).

        Comment

        Working...
        X