Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 199674 Details for
Bug 351550
[Table] Render glitches on gridlines with fixed columns
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
fix for tree_table_merge branch
tlg.patch (text/plain), 5.88 KB, created by
Tim Buschtoens
on 2011-07-14 11:26:35 EDT
(
hide
)
Description:
fix for tree_table_merge branch
Filename:
MIME Type:
Creator:
Tim Buschtoens
Created:
2011-07-14 11:26:35 EDT
Size:
5.88 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt.q07 >Index: js/org/eclipse/rwt/TreeRowContainerWrapper.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/rwt/Attic/TreeRowContainerWrapper.js,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 TreeRowContainerWrapper.js >--- js/org/eclipse/rwt/TreeRowContainerWrapper.js 12 Jul 2011 17:21:21 -0000 1.1.2.2 >+++ js/org/eclipse/rwt/TreeRowContainerWrapper.js 14 Jul 2011 15:05:58 -0000 >@@ -121,7 +121,7 @@ > this._rowWidth = value; > this._layoutX(); > }, >- >+ > setScrollLeft : function( value ) { > this._container[ 1 ].setScrollLeft( value ); > }, >@@ -146,7 +146,7 @@ > this._container[ 0 ].renderAll(); > this._container[ 1 ].renderAll(); > }, >- >+ > _updateConfig : function() { > var configLeft = this._container[ 0 ].getRenderConfig(); > var configRight = this._container[ 1 ].getRenderConfig(); >Index: js/org/eclipse/rwt/widgets/TreeRowContainer.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/rwt/widgets/Attic/TreeRowContainer.js,v >retrieving revision 1.3.2.12 >diff -u -r1.3.2.12 TreeRowContainer.js >--- js/org/eclipse/rwt/widgets/TreeRowContainer.js 6 Jul 2011 10:24:49 -0000 1.3.2.12 >+++ js/org/eclipse/rwt/widgets/TreeRowContainer.js 14 Jul 2011 15:05:58 -0000 >@@ -140,11 +140,8 @@ > for( var i = 0; i < linesNeeded; i++ ) { > this._renderVerticalGridline( i ); > } >- while( this._vertGridLines.length > linesNeeded ) { >- var line = this._vertGridLines.pop(); >- if( line ) { >- this._getTargetNode().removeChild( line ); >- } >+ for( var i = linesNeeded; i < this._vertGridLines.length; i++ ) { >+ this._removeGridLine( i ); > } > }, > >@@ -156,11 +153,13 @@ > var line = this._getVerticalGridline( column ); > line.style.left = left + "px"; > line.style.height = this.getHeight() + "px"; >+ } else { >+ this._removeGridLine( column ); > } > }, > >- _getVerticalGridline : function( number ) { >- if( typeof this._vertGridLines[ number ] === "undefined" ) { >+ _getVerticalGridline : function( column ) { >+ if( typeof this._vertGridLines[ column ] === "undefined" ) { > var line = document.createElement( "div" ); > line.style.zIndex = 1; > line.style.position = "absolute"; >@@ -174,9 +173,16 @@ > this._getTargetNode().appendChild( line ); > }, this ); > } >- this._vertGridLines[ number ] = line; >+ this._vertGridLines[ column ] = line; >+ } >+ return this._vertGridLines[ column ]; >+ }, >+ >+ _removeGridLine : function( column ) { >+ if( this._vertGridLines[ column ] ) { >+ this._getTargetNode().removeChild( this._vertGridLines[ column ] ); >+ delete this._vertGridLines[ column ]; > } >- return this._vertGridLines[ number ]; > }, > > _getVerticalGridBorder : function() { >#P org.eclipse.rap.rwt.q07.jstest >Index: js/org/eclipse/rwt/test/tests/TreeUtilTest.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt.test/org.eclipse.rap.rwt.q07.jstest/js/org/eclipse/rwt/test/tests/TreeUtilTest.js,v >retrieving revision 1.1.2.11 >diff -u -r1.1.2.11 TreeUtilTest.js >--- js/org/eclipse/rwt/test/tests/TreeUtilTest.js 12 Jul 2011 17:21:20 -0000 1.1.2.11 >+++ js/org/eclipse/rwt/test/tests/TreeUtilTest.js 14 Jul 2011 15:06:00 -0000 >@@ -401,7 +401,7 @@ > tree.destroy(); > }, > >- testLinesVisibleForSplitTree: function() { >+ testLinesVisibleForSplitTree : function() { > var testUtil = org.eclipse.rwt.test.fixture.TestUtil; > var tree = this._createSplitTree(); > for( var i = 0; i < 5; i++ ) { >@@ -422,6 +422,43 @@ > tree.destroy(); > }, > >+ testVerticalGridLayoutOnSplitTree : function() { >+ var testUtil = org.eclipse.rwt.test.fixture.TestUtil; >+ var tree = this._createSplitTree(); >+ testUtil.flush(); >+ var cont1 = tree.getRowContainer().getSubContainer( 0 )._getTargetNode(); >+ var cont2 = tree.getRowContainer().getSubContainer( 1 )._getTargetNode(); >+ var offset1 = cont1.childNodes.length; >+ var offset2 = cont2.childNodes.length; >+ tree.setLinesVisible( true ); >+ testUtil.flush(); >+ assertEquals( offset1 + 2, cont1.childNodes.length ); >+ assertEquals( offset2 + 3, cont2.childNodes.length ); // column count is 5 >+ assertEquals( 49, parseInt( cont1.childNodes[ offset1 ].style.left ) ); >+ assertEquals( 21, parseInt( cont1.childNodes[ offset1 + 1 ].style.left ) ); >+ assertEquals( 20, parseInt( cont2.childNodes[ offset2 ].style.left ) ); >+ assertEquals( 52, parseInt( cont2.childNodes[ offset2 + 1 ].style.left ) ); >+ assertEquals( 52, parseInt( cont2.childNodes[ offset2 + 2 ].style.left ) ); >+ tree.destroy(); >+ }, >+ >+ testVerticalGridLayoutOnChangeFixedColumns : function() { >+ var testUtil = org.eclipse.rwt.test.fixture.TestUtil; >+ var tree = this._createSplitTree(); >+ testUtil.flush(); >+ var cont1 = tree.getRowContainer().getSubContainer( 0 )._getTargetNode(); >+ var cont2 = tree.getRowContainer().getSubContainer( 1 )._getTargetNode(); >+ var offset1 = cont1.childNodes.length; >+ var offset2 = cont2.childNodes.length; >+ tree.setLinesVisible( true ); >+ testUtil.flush(); >+ org.eclipse.rwt.TreeUtil.setFixedColumns( tree, 0 ); >+ testUtil.flush(); >+ assertEquals( offset1, cont1.childNodes.length ); >+ assertEquals( offset2 + 5, cont2.childNodes.length ); // column count is 5 >+ tree.destroy(); >+ }, >+ > ///////// > // helper >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 351550
: 199674