Hi aurelien and Kelly,

@aurelien, what do you mean with share in a page?  Basically I have some 
images referenced in a google sheet, so I am rendering the corresponding 
thumb of each one using <iron-image> component. Now, I want to open the 
large image when the user clicks a thumb.  Here is my custom component. 


<dom-module id="my-portfolio">
<style>
.card {
  margin: 20px;
 }
</style>
<template>
  <paper-material elevation="1" class="layout center">
  <google-sheets id="sheet" 
key="1lBZvP1tufnRegYqUcUUrwAGx5hROtBHDsaxKfOU-Zg4" published tab-id="1" 
rows="{{rows}}"></google-sheets>
    <template is="dom-repeat" items="[[rows]]">
        <iron-image class="card"
        style="background-color: lightgray;"
        preload src$="{{getImagePath(item.gsx$filename.$t)}}"
        pressed$="{{onCardClick}}"></iron-image>
    </template>
  </paper-material>
</template>
</dom-module>
<script>
Polymer({
  is:"my-portfolio",
  getImagePath: function(url){
    return '../../images/thumbs/'+ url;
  },
  onCardClick: function(event){
      console.log("Card Clicked: "+event.target.id);
  },
  ready: function() {
    this.$.sheet.addEventListener('google-sheet-data', function(e) {
         console.log("on-google-sheet-data");
         console.log(this.rows[1].gsx$filename.$t);
     });
  }
});
</script>




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/963ea728-967e-437b-941c-d8f969d1d189%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to