|
|
|
[
Permlink
| « Hide
]
Benjamin Shine - 17/Dec/07 01:02 PM
A fix for this is in review; it is 20071217-ben-0.tar.gz
r7580 | ben | 2007-12-17 18:58:58 -0800 (Mon, 17 Dec 2007) | 28 lines
Changed paths: M /openlaszlo/trunk/docs/src/developers/tutorials/comp-intro.dbk M /openlaszlo/trunk/docs/src/xsl/common-html.xsl Change 20071217-ben-0 by ben@slim.local on 2007-12-17 12:45:57 PST in /Users/ben/src/svn/openlaszlo/trunk for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Improve canvas sizing in embedded examples in docs Bugs Fixed: Technical Reviewer: iorio (pending) Documentation: This change makes the default canvas height for a live example be 400 pixels. This change also includes an example of the best way to specify the canvas height, by adding a parameter element to the programlisting element: <parameter role="canvas">height: 200</parameter> Examples of this usage are in docs/src/developers/tutorials/comp-intro.dbk Release Notes: Details: Tests: r7624 | ben | 2007-12-19 14:50:14 -0800 (Wed, 19 Dec 2007) | 33 lines
Changed paths: M /openlaszlo/trunk/docs/src/xsl/common-html.xsl Change 20071219-ben-Q by ben@slim.local on 2007-12-19 14:42:49 PST in /Users/ben/src/svn/openlaszlo/trunk for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Doc tools improvements -- don't load DHTML lfc, specify history: false New Features: Bugs Fixed: Technical Reviewer: none QA reviewer: liorio Documentation: Discussion with Max revealed that we should pass in "history: false" when we call Lz.swfEmbed( ... ) for a live example, so that we don't irritate the history mechanism. This makes hundreds of firebug errors go away on every page of the developer's guide. Also, it is just not necessary to include LFCdhtml.js when we're not planning to include any dhtml live examples at this point! This change also finally makes it so that the default height of embedded examples is 400. I'm not sure why this change does that, but it did, so, rejoice. Tests: ant clean developers visit http://localhost:8080/trunk/docs/developers/color.html note that there are no firebug errors same with http://localhost:8080/trunk/docs/developers/tutorials/laszlo_basics.html I am so in progress on this! It is not fixed yet in the currently checked in stuff.
This is an example from the developer's guide which is indicated in the code itself to be 260 pixels tall. The on-screen ruler indicates that this example is indeed 260 pixels tall.
(This is in a local development version.) Check out these cool live examples from the button reference page. The canvas is exactly the height specified in the examples themselves -- 30 pixels! (This is in a local development build.)
r7645 | ben | 2007-12-20 13:18:24 -0800 (Thu, 20 Dec 2007) | 52 lines
Change 20071220-ben-8 by ben@slim.local on 2007-12-20 12:42:09 PST in /Users/ben/src/svn/openlaszlo/trunk for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Make example canvases get their height from the example code New Features: Bugs Fixed: Technical Reviewer: iorio (pending) QA Reviewer: brynn (pending) Documentation: Two crucial changes here! First, our build file was set up wrong when it generated the intermediate developers/index.dbk. It has to put this file into docs/src/build/developers/index.dbk; it used to put it into docs/developers/index.dbk -- effectively losing all the delicious processing that had been done to it by the dbkpreprocessexamles.xsl worksheet. That delicious processing includes a step that determines the canvas width and height from the program listing itself. Second! The part of common-html.xsl that actually sends canvas parameters to Lz.swfEmbed(...) was only sending the first canvas parameter it found! This code... <xsl:variable name="canvas-parameters"> <xsl:if test="parameter[@role='canvas']"> <xsl:value-of select="parameter[@role='canvas']"/> </xsl:if> ... </xsl:variable> ...actually only puts the first answer to the xpath query parameter[@role='canvas'] into the variable $canvas-parameters. This is an xsl subtlety that I don't understand, but it has something to do with how node-sets are coerced into strings when their value is taken. To fix this, I have added a for-each which explicitly concatenates the value of each canvas parameter, with a comma between them. This (thank goodness) inserts the correct canvas width and height parameters into the call to Lz.swfEmbed. Tests: Note the canvas height for example 34.1, basecomponent, is 260 pixels, as specified in the program listing: http://localhost:8080/trunk/docs/developers/custom-components.html Note that the canvas height of the first two examples is 30 pixels, as specified in the program listing: http://localhost:8080/trunk/docs/reference/lz.button.html Canvas height is now derived from the sample code, but some examples are still broken. Those examples are noted in separate bug reports.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||