Community
Participate
Working Groups
Build Identifier: RAP 1.3 CoolItems are wrongly positioned on its CoolBar panel in case of small panel size. Reproducible: Always Steps to Reproduce: 1. Run DemoWorkbench application from org.eclipse.rap.demo. 2. Switch to Demo perspective. 3. Reduce window size like it is shown on (demo.png) 4. Switch perspective to Planning. You will see problem as on Planning(bad).png. If you switch to Planning perspective before size reducing - everything is OK (see Planning(good).png).
Created attachment 188126 [details] demo.png
Created attachment 188127 [details] planning(good).png
Created attachment 188128 [details] planning(bad).png
I've found that following fixes in CoolItem.js resolve the problem. // reparenting to enable coolitem dragging setControl : function( control ) { if( control != null ) { // TODO [tb] : Control positioning is already handled by server control.setTop( this.getTop() ); control.setLeft( this.getLeft() + org.eclipse.swt.widgets.CoolItem.CONTROL_OFFSET ); control.setDisplay( true ); } if( this._control != null ) { this._control.setDisplay( false ); } this._control = control; }, Using control.setTop( this.getTop() ); instead of control.setTop( 0 );
This is reproducible with CVS HEAD too.
Fixed in CVS HEAD by removing the control.setTop at all. As control bounds are calculated by the server, setTop is not needed.