Announcement

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

    [Urgent issue] white space issue on the application

    Hello Guyz,

    I attached sample application on the issue that I am currently facing, I will explain it through the following example:

    Code:
    	public void onModuleLoad() {
    				
    		VLayout vLayout = new VLayout();
    		vLayout.setSize("100%", "100%");
    		vLayout.setBackgroundColor("#FF0000");
    		
    		final VLayout mainAppUI = new VLayout();
    		mainAppUI.setBackgroundColor("#00FF00");
    		mainAppUI.setWidth100();
    		mainAppUI.setHeight100();
    		mainAppUI.setMinWidth(1024);
    		mainAppUI.setOverflow(Overflow.AUTO);
    		vLayout.addMember(mainAppUI);
    		
    		final com.smartgwt.client.widgets.Window testWindow = new com.smartgwt.client.widgets.Window();
    		testWindow.setWidth(200);
    		testWindow.setHeight(500);
    		testWindow.setCanDragReposition(true);
    	testWindow.setOverflow(Overflow.HIDDEN);
    		
    
    		
    		Button bb = new Button("ffffff");
    		bb.addClickHandler(new ClickHandler() {
    			
    			@Override
    			public void onClick(ClickEvent event) {
    				
    				testWindow.show();
    			}
    		});
    		
    		mainAppUI.addMember(bb);
    		
    		Label label = new Label("test App");
                    label.setHeight(3);
    		label.setTop(40);
    		label.setCanDragReposition(true);
    		mainAppUI.addChild(label);
    		vLayout.draw();
    		
    }

    There are 2 scenarios for the bug:
    1)Try to move(drag reposition) the label to the most right you will notice that a white space appear (this space is for a body space).

    2)Click on the button and drag(drag reposition) the opened window to the most right as the white space will appear (this space is for a body space).

    I can solve this issue by setting the overflow of the body to hidden, but at the same time I need to set a minimum width of the body, also I thought by changing the style to scroll of the body when it reaches the minimum width, but at the same time.

    Also I found another solution by using keepInParent(Rectangle Rect), but I am developing a large application, I think it is not right to make every developers in the project to force them to use this method in the dragged object?

    Does any one know how to solve this issue?

    Any help is appreciated :)

    Note: this bug appears on IE, Chrome and FF

    #2
    You can work around by using setKeepInParent but I am wondering what you will do if the user tries to drag a record from ListGrid?

    Comment


      #3
      I think the solution must be through the application not through each components, let's wait Isomorphic response?

      Comment


        #4
        I hope one of you guyz answers me if he knows the issue.

        Comment


          #5
          wait for Isomorfic response , i have the same issue !

          Comment


            #6
            Still waiting the for the response of Isomorphic.

            Comment


              #7
              Hi Guys,

              I have the same problem with more Space when drag window out Side the apps.

              Please help.

              Comment


                #8
                This threaded was posted one week ago, and it seems it is popular, I am wondering why Isomorphice does not reply?

                Comment


                  #9
                  Isomorphic, a sample application was posted that illustrates potential issues and deserves a response. Is there a recommended way to avoid dragging beyond the bounds of the application?

                  Comment


                    #10
                    The original poster already figured it out - set keepInParentRect. This will not affect a ListGrid drag or other data-related drag - it affects dragReposition and dragResize only.

                    If you're worried about whether this will be set for all widgets, require that any widget added to the container is added via an API that automatically sets this property.

                    Comment


                      #11
                      What about the Windows implementation we are using window.show() method and we did not add it to the container?

                      Comment


                        #12
                        Also how can I prevent the user from dragging out the record from the listGrid to out of the application? In another way I want to make a limitation on the dragging distance so the dragged Item will not go out of the application?

                        Comment


                          #13
                          Also what about the modality when the I resize the browser it seems that the modality does not resized according to the browser may cause the white space.

                          Comment

                          Working...
                          X