I'm using polymer to render certain things to a canvas. The canvas is 
overlaid on some video and it is performing annotations of object video 
analytics style. Each rendering element represents a certain type of object 
that needs to be rendered, e.g, zones, lines, streaming annotation. Having 
the logic for each element mean that the encapsulation of the code is sane.

I have multiple polymer elements that need to render to the same canvas. Is 
the best way to do this to pass the canvas id into the elements?

<canvas id="myCanvas"></canvas>
<rendering-element canvas="myCanvas"></rendering-element>
<other-rendering-element canvas="myCanvas"></other-rendering-element>
<rendering-element canvas="myCanvas"></rendering-element>

The elements will use document.getElementById('myCanvas') and use the 
returned element to render their data.

Is this the best practice for this?

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/10a0b581-b1c6-4081-bc9f-9989d733b405%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to