You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2019/10/17 22:08:56 UTC

[GitHub] [royale-asjs] cristallium edited a comment on issue #519: SDK 0.9.6 bead work only on header DataGrid, not on cells

cristallium edited a comment on issue #519: SDK 0.9.6 <js:DataGridPercentageView/> bead work only on header DataGrid, not on cells
URL: https://github.com/apache/royale-asjs/issues/519#issuecomment-543382193
 
 
   Here is to help you debug the SDK 
   
   ![image](https://user-images.githubusercontent.com/6851433/67051239-dbd3d180-f13a-11e9-8977-81360b215af0.png)
   
   In the **DataGridPercentageView** function **handleInitComplete**
   ```
   ...
         if (!isNaN(dgc.columnWidth)) {
           list.width = NaN; // <= we set NaN to width but it doesn't work
           list.percentWidth = Number(colWidth);
         }
   ...
   ```
   
   I think the issue is here in **UIbase**.js 
   
   ```
   org.apache.royale.core.UIBase.prototype.setWidth = function(value, noEvent) { // Enter in function with value = NaN
     noEvent = typeof noEvent !== 'undefined' ? noEvent : false;
     if (this.org_apache_royale_core_UIBase__width !== value) {
       this.org_apache_royale_core_UIBase__width = value;
       this.positioner.style.width = value.toString() + 'px'; // <== HERE when value = NaN this.positioner.style.width is unchanged
       if (!noEvent)
         this.dispatchEvent(new org.apache.royale.events.Event("widthChanged"));
     }
   ```
   
   I believe that in **UIbase** function **setWidth** , _this.positioner.style.width_ sould be set to NaN and not value + "px" if value is NaN 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services