MyCard

Ok. I see.

On Tue, Dec 16, 2014 at 1:04 PM, Simon-Pierre Gingras <
notifications@github.com> wrote:
>
> In PokerPlanningClient/web/components/my_card.dart
> <https://github.com/ArcBees/poker-planning/pull/5#discussion-diff-21917864>
> :
>
> > +      ..clickHandler = clickHandler;
> > +
> > +    return component;
> > +  }
> > +
> > +  void setSelected(bool selected) {
> > +    $["valueContainer"].classes.toggle("selected", selected);
> > +  }
> > +
> > +  void onValueClicked(Event e, var detail, Node target) {
> > +    clickHandler(value);
> > +    clearSelectedCards();
> > +    setSelected(true);
> > +  }
> > +
> > +  static void clearSelectedCards() => querySelectorAll("my-card").forEach((MyCard c) => c.setSelected(false));
>
> my-card is visible at the document level, that's why this works.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ArcBees/poker-planning/pull/5/files#r21917864>.
>