Closed dman777 closed 7 years ago
I changed:
_setInert: function() {
var deep = this.$.container,
sliSel = deep.querySelectorAll('paper-slide');
to
_setInert: function() {
sliSel = this.querySelectorAll('paper-slide');
In addition, I had to make a <paper-slide>2</paper-slide>
dummy element:
<div class="container">
<l2t-paper-slider auto-progress slide-duration="2" total-slides="5">
<template is="dom-repeat"
items="[[listing.results173.images]]"
as="url"
id="listResults">
<paper-slide
style="background-image: url([[computeImageURL(url)]]); background-repeat: no-repeat"
></paper-slide>
</iron-image>
</template>
<paper-slide>2</paper-slide>
</l2t-paper-slider>
</div>
Can you try
_setInert: function() {
var deep = this.shadowRoot.querySelector('#container'),
sliSel = deep.querySelectorAll('paper-slide');
I think shadowRoot.querySelector('#container')
should do the same thing as $.container
but just a longer way of typing it.
Changing
_setInert: function() {
var deep = this.$.container,
sliSel = deep.querySelectorAll('paper-slide');
to
_setInert: function() {
sliSel = this.querySelectorAll('paper-slide');
worked for me. I didn't need to make a dummy <paper-slide>
.
However, changing to
_setInert: function() {
var deep = this.shadowRoot.querySelector('#container'),
sliSel = deep.querySelectorAll('paper-slide');
did not work.
_setInert: function() {
sliSel = this.querySelectorAll('paper-slide');
doesn't work with multiple instances of l2t-paper-slider
.
I changed it to
_setInert: function() {
var sliSel = this.getContentChildren('#myContent');
and added id="myContent"
to <content id="myContent"></content>
Right I know what the issue is now, it's to do with the order of operations.
OK, I've patched it to master (but not to a release)
can you try it out here and let me know if that solves everything
https://jsfiddle.net/link2twenty/5kp15L5L/
Thanks 🙂
I've pushed it to a new release.
Using Polymer 1.7.*., chrome, and not using webcomponents.min.js file.... native shadow dom instead.