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 2017/11/15 04:29:32 UTC

[GitHub] justinmclean opened a new issue #89: Label text strings are "trimmed"

justinmclean opened a new issue #89: Label text strings are "trimmed"
URL: https://github.com/apache/royale-asjs/issues/89
 
 
   Any space in the text property of a label are "trimmed". In some cases this can give odd results.
   
   A contrived example:
   (obviously the label could be replaced by a single label in this case but this is just to illustrate the point / issue.)
   
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:js="library://ns.apache.org/royale/basic">
   
      <js:valuesImpl>
          <js:SimpleCSSValuesImpl/>
      </js:valuesImpl>
   
       <js:beads>
            <js:ApplicationDataBinding />
       </js:beads>
   
   
       <fx:Script><![CDATA[
           [Bindable] public var name:String = "John";
           ]]></fx:Script>
   
      <js:initialView>
          <js:View>
              <js:Container>
                  <js:beads>
                      <js:HorizontalLayout />
                  </js:beads>
                  <js:Label text="Hi "/>
                  <js:Label text="{name}"/>
                  <js:Label text=" and welcome"/>
              </js:Container>
          </js:View>
      </js:initialView>
   </js:Application>
   ```
   
   Produces this output:
   ![2017-11-15_15-14-24](https://user-images.githubusercontent.com/144504/32818571-298174d8-ca18-11e7-9cba-68a470892a51.png)
   
   HTML keeps spaces for instance the spaces are not trimmed in these HTML examples:
   ```
   <span>Hi </span><span>John</span><span> and welcome</span>
   <span>value: </span><input type="text" />
   ```
   
   Also the same in Flex:
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
   			   xmlns:s="library://ns.adobe.com/flex/spark" 
   			   xmlns:mx="library://ns.adobe.com/flex/mx">
   	
   	<s:HGroup>
   		<s:Label text="value " />
   		<s:TextInput />
   	</s:HGroup>
   	
   </s:Application>
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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