OSDN Git Service

docs: revise resizing scripts to better organize the
authorScott Main <smain@google.com>
Mon, 2 Nov 2009 23:31:04 +0000 (15:31 -0800)
committerScott Main <smain@google.com>
Tue, 3 Nov 2009 04:06:04 +0000 (20:06 -0800)
commit3f7d1df12938b6db9849b03c05d5a56784ee147b
tree0fad916b660998504ddf7119cc74f3eb94194a2c
parent64b879ac5bbabe0489869f76b3a20f26aca6ce22
docs: revise resizing scripts to better organize the
tasks into chunks that are only executed when necessary.

Move the stuff that does the reference panel resizing
into a separate method because this should only happen when
literally resizing the panels. This thus resolves the problem
in which an invalid cookie would sometimes be written during
a normal window resize event -- there's no need to write that
cookie unless the user literally resizes the panel.

There's no need to call resizeWidth all the time, the doc-content
div can manage its width by inheritence and should only ever have
to resize its left margin when the side nav is manually resized or
when the page is loaded (in order to account for a saved side nav
width). This vastly improves the performance and visual quality
when resizing. However, IE6 still requires this in order for the scrollbars
to be visible in the content area. So a flag is now set when IE6 is
the browser, it has its own onresize method
and the width is defined only for IE6.

Inside resizeHeight, check what the href path is before doing any
resizing, just to make sure we don't do unecessary work and to
make the code more readable.
tools/droiddoc/templates/assets/android-developer-docs.js