Re: [polymer-dev] Multiple instances of elements seem to be sharing property values ?

2016-03-18 Thread Rob Stone
Issue raised 7 months ago, if only the console.warn mentioned there had been implemented ;) https://github.com/Polymer/polymer/issues/2240 Follow Polymer on Google+: plus.google.com/107187849809354688692 --- You received this message because you are subscribed to the Google Groups "Polymer" gro

[polymer-dev] Re: translate javascript to typescript

2016-03-18 Thread Mallegriss
sorted out. .attr("d", d3.svg.symbol() .size(d => d.size)) On Wednesday, March 16, 2016 at 10:42:51 PM UTC+13, Mallegriss wrote: > > Hi guys, > > I'd like to know how to translate below piece code into typescript: > > this.nodes = svg.selectAll(".node") >

Re: [polymer-dev] Multiple instances of elements seem to be sharing property values ?

2016-03-18 Thread Karl Tiedt
It is how Javascript has always worked... Arrays and Objects are by reference, so in this situation, you have to return a new instance to get that separation. In other libraries this was usually handled in the constructor with this.varname = []; but in Polymer, if you want to handle it in the prop

Re: [polymer-dev] Multiple instances of elements seem to be sharing property values ?

2016-03-18 Thread Rob Stone
Ouch !!! Thanks Karl, that's a really nasty gotcha, would be interested to hear from the polymer team why this is necessary. On Friday, 18 March 2016 15:08:59 UTC, Karl Tiedt wrote: > > Read the docs on properties and you'll see a statement about using: > > value: function() { return []; } > > In