Announcement

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

    Using roll over canvas breaks cell wrap in grid, 4.0p, regression

    Hello,

    We updated Smartgwt 4.0 to latest nightly 2013-10-22 from 2013-08-26 version and our list grids with roll over canvases started acting up. It seems that when a roll over canvas is shown it somehow disables cell content wrapping and forces the row height to reset back to "a single row".

    Reproducible with the following:

    Code:
        public Record r() {
            Record r = new Record();
            r.setAttribute("f1", "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.");
            r.setAttribute("f2", "Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum.");
            return r;
        }
    
        public void onModuleLoad() {
            SC.showConsole();
    
            viewport = new VLayout();
            viewport.setWidth100();
            viewport.setHeight100();
            viewport.setMembersMargin(20);
    
            final ListGrid g = new ListGrid() {
                HLayout h = null;
                @Override
                protected Canvas getRollOverCanvas(Integer rowNum, Integer colNum) {
                    if(h == null) {
                        h = new HLayout();
                        h.setBackgroundColor("#f00");
                        h.setSize("10", "10");
                    }
                    return h;
                }
            };
            g.setWidth(500);
            g.setHeight(200);
            g.setShowRollOver(true);
            g.setShowRollOverCanvas(true);
            g.setWrapCells(true);
            g.setFixedRecordHeights(false);
            ListGridField f1 = new ListGridField("f1");
            ListGridField f2 = new ListGridField("f2");
            g.setFields(f1, f2);
            g.setData(new Record[] { r(), r(), r(), r() });
            viewport.addMember(g);
    
            Button offb = new Button("disable rollover, now it works");
            offb.setWidth(300);
            offb.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    g.setShowRollOverCanvas(false);
                }
            });
            viewport.addMember(offb);
    
            Button onb = new Button("enable rollover, now it fails again");
            onb.setWidth(300);
            onb.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    g.setShowRollOverCanvas(true);
                }
            });
            viewport.addMember(onb);
    
            viewport.draw();
        }
    Hovering the mouse on the grid flickers a lot as the cell content gets de-wrapped. Click the disable-button to disable the roll over in the grid and see that the problem goes away. When run with older nightly mentioned the roll over canvas is shown on top of the correctly wrapped content.

    Using SmartClient Version: v9.0p_2013-10-22/LGPL Development Only (built 2013-10-22).

    br,
    Marko

    #2
    We've made a change to fix this issue.
    Please try the next nightly build, dated Oct 26 or above

    Regards
    Isomorphic Software

    Comment


      #3
      Fixed. Thanks!

      Comment

      Working...
      X