Why does Dojo BorderContainer switch to absolute sizing after clicking its splitter?

129 Views Asked by At
  • Why does Dojo BorderContainer switch to absolute sizing after clicking its splitter?
  • What did clicking the splitter do? What widget properties must I modify to return to the original percentage-based relative sizing?

Simple demo: http://jsfiddle.net/Leftium/waMRL/

var cp1 = new ContentPane({
    region: "left",
    style: "width: 50%", // This property is changed to an absolute value someplace...
    splitter: true,
    content: "<pre>region: left<br>width: 50%</pre>",
});

I want my BorderContainer regions to use relative sizing. If they are resized via the splitter, I want the regions to maintain those new relative sizes.

Currently, the BorderContainer regions maintain their relative sizes when resizing the browser. However, they switch to absolute sizing after the splitter is clicked.

1

There are 1 best solutions below

0
On

When you manually move the splitter, what you are saying is "I wish to manually override the width of the region". It sounds like what you wish to achieve is that a resize of a region results in new percentage width. For example, if a window is 1000px wide and a region is 50% then it will be 500px. If you then resize to 100px it will remain at 100px. What I think you are after is that the new width would be "10%". (100px = 10% of 1000px). Unfortunately, that's not how the splitter works.