Marcel Ruff wrote:

   <g id="flight<your number>" transform="translate(yourX, yourY)">
      <use xlink:href="airplanes.svg#boeing747"
           x="0" y="0" width="20" height="20"/>
      <text id="flight<your number>_label">your number</text>
   </g>


One more question arose:

The <use xlink ...> is only a reference pointing to the symbol
in my library, it is not a deep copy (clone),
if i understand this correctly.

Correct.

If i now switch on the light in one of the boeing747
just landed but want another airborne boeing747 to remain dark,
how can i achieve this?

One option is to use airplanes.svg#boeing747_on and airplanes.svg#boeing747_off. This might work well if there are only a few states (and has the advantage that the rendering of the states can be quite different if wanted). This will not work well if you want to have 53 different colors or something.

Is there a <use> variant which forces a copy instead of
a reference?

No, but you can either use Java or 'getURL' to fetch the airplanes.svg document and use 'cloneNode(true)' to get a deep clone of the airplane symbol. Then you do need to be careful of Id's etc. In this case get the reference (can't really be a 'symbol' element since that inhibits rendering) clone the tree and append the clone under the group instead of the 'use' element.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to