Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Resolving percent width as 0px in canvas

$
0
0
Hi there,

the issue described here happens in the first release of SmartGWT 4.1 and latest patched versions. Tested today with SmartClient Version: v9.1p_2014-07-24/LGPL Development Only (built 2014-07-24)

We use a lot of ListGrid inside CanvasItem in the DynamicForms. Since we started the project we've been using percent width in this cases and always worked until now. When setting ListGrid's width in pixels, it is drawn correctly. Every ListGrid in CanvasItem, at drawing time, make this stacktrace in Dev Console:
Code:

12:07:00.477:TMR9:WARN:drawing:isc_DireccionListGrid_0:negative or zero area: height: 120, width: 0, refusing to draw
    Canvas.readyToDraw()
    ListGrid.draw(_1=>undef, _2=>undef, _3=>undef, _4=>undef)
    CanvasItem.placeCanvas(_1=>undef)
    DynamicForm.$11c(_1=>"placeCanvas")
    DynamicForm.$103()
    FormItem.adjustOverflow(_1=>"textBox value changed")
    FormItem.setElementValue(_1=>"<span style='display:inline-block;backgr..."[298], _2=>true)
    FormItem.$952(_1=>"Proveedor", _2=>true)
    FormItem.$124t(_1=>true, _2=>undef)
    FormItem.setValue(_1=>true, _2=>true, _3=>undef, _4=>undef)
    DynamicForm.setItemValues(_1=>Obj{ID:31246}, _2=>true, _3=>undef, _4=>undef)
    DynamicForm.$9n(null, undef)
    [c]Page.handleEvent(_1=>null, _2=>"idle", _3=>undef)
    [c]EventHandler.$jw()
    [c]Class.fireCallback(_1=>Obj, _2=>null, _3=>null, _4=>null, _5=>true)
    [c]Timer.$in(_1=>"$ir449")

Every ListGrid inside a DynamicForm is defined as follow:
Code:

// Crear el DireccionListGrid Item
direccionListGrid = new DireccionListGrid(true);
direccionListGrid.setWidth(EDITORLISTGRID_WIDTH); // "90%"
direccionListGrid.setHeight(EDITORLISTGRID_HEIGHT); // 120

canvasItemDireccion = new CanvasItem("canvasItemDireccion");
canvasItemDireccion.setShowTitle(false);
canvasItemDireccion.setColSpan(2);
canvasItemDireccion.setAlign(Alignment.CENTER);
canvasItemDireccion.setCanvas(direccionListGrid);

Thanks for your support. I wish this could help

Viewing all articles
Browse latest Browse all 4756

Trending Articles