Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    window resizing issue

    SmartClient 8.3 2013-07-25
    Firefox12/IE9

    Run the sample testcase. begin with a maximum size window. Notice that there is a label on the left and a menu on the right. Now resize the window. Resize its width until the "TEST" label disappears. The scrollbar at the bottom should show up but you can't scroll to the left to try and see the label.

    This seems to be related to the defaultLayoutAlign property. When I remove this property, then the scrolling behaves fine, allowing me to scroll to a view where TEST is visible.

    NOTE that I tried it with 8.2 2013-03-26 as well and it is reproduceable. So I am assuming that I am using this property incorrectly but I don't know how else I should be using it.


    Code:
    <HTML>
    </HEAD>
    <body class="pageBackground" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" scroll="no" style="overflow:hidden">
    
    
    <meta content="text/html; charset=UTF-8" http-equiv="content-type">
    
    <SCRIPT>var isomorphicDir = "isomorphic/"</SCRIPT>
        <SCRIPT>var isomorphicDir = "isomorphic/"</SCRIPT>
        <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
        <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
        <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
        <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
        <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
        <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
    	<SCRIPT SRC=isomorphic/skins/Enterprise/load_skin.js></SCRIPT>
    <SCRIPT>
    
    
    isc.VStack.create({ID:"vLayout",
    name:"vLayout",
    autoDraw:true,
    height:"100%",
    width:"100%",
    overflow:"scroll",
    align:"top",
    defaultLayoutAlign:"center",
    members:
    	[isc.VStack.create({
    	ID:"VerticalLayout",
    	name:"VerticalLayout",
    	height:"100%",width:1040,
    	members:
    		[isc.HStack.create({
    		ID:"mLayout",
    		name:"mLayout",
    		height:1,width:"100%",
    		members:
    			[isc.VStack.create({
    					ID:"HorizontalLayout",
    					name:"HorizontalLayout",
    					height:1,
    					width:"100%",
    					members:
    						[isc.HStack.create({
    						ID:"appHeaderLayout",
    						name:"appHeaderLayout",
    						height:30,width:"100%",
    						membersMargin:6,
    						align:"left",
    						defaultLayoutAlign:"center",
    						members:
    							[isc.Label.create({
    								ID:"returnAppLabel",
    								name:"returnAppLabel",contents: "TEST",height:1,wrap:false
    								}),
    							isc.MenuButton.create({ID:"prefMenu",canFocus:true,title:"| Preferences",align:"top"})
    							]
    						})
    					]
    			})]
    		})
    	]})
    	]
    })
    
    
    </script>
    </HTML>

    #2
    Any luck with this issue?

    Comment


      #3
      Basically, the system is doing what you've told it to - it's centering the Layout members within the width of the Layout, and since the members are wider than the Layout, that means they get placed at a negative left coordinate. Negative left coordinates cannot be scrolled to (this is also correct).

      This overall behavior is what you want in various use cases. But the behavior you seem to want (turn off centering when it would place a widget at negative coordinates) also makes sense as an option.

      We're still considering whether we should we add a new option here or just recommend a different structure for your layouts..

      Comment


        #4
        Adding this implementation of getMemberOffset to your outermost Layout (ID:"vLayout") gives you the behavior you want:

        Code:
        getMemberOffset : function (member, defaultOffset) {
            if (defaultOffset < 0) return 0;
            return defaultOffset;
        },
        For now, we don't plan to add a flag to control this. We may revisit this in the future.

        Comment


          #5
          Thanks for the workaround. I'll give it a try

          Comment

          Working...
          X