Closed ozasadnyy closed 7 years ago
I will send a PR in a minute
I do not see this effect. What am I doing wrong?
<head>
...
<script src="bower_components/webcomponentsjs/webcomponents-loader.js"></script>
<link rel="import" href="bower_components/plastic-image/plastic-image.html">
<style>
body {
margin: 0;
font-family: 'Roboto', 'Noto', sans-serif;
line-height: 1.5;
min-height: 100vh;
background-color: #eeeeee;
}
.image {
width: 200px;
height: 200px;
background-color: purple;
}
</style>
</head>
<body>
<dom-bind>
<template>
<template is="dom-repeat" items="[[images]]" as="image">
<plastic-image class="image" srcset="[[image]]" sizing="cover" lazy-load preload fade></plastic-image>
</template>
</template>
</dom-bind>
<script>
let db = document.querySelector('dom-bind');
db.images = ['alleycat.jpeg', 'badwolf.jpg', '', 'darkwing.png'];
</script>
</body>
Which gives me:
Yeah, bad example. Sorry. Try to iterate in the js code on a single <plastic-image>
Got it
Assume we have an array of images
and template:
at third itteration image will not be changed so
'/image-2.jpg'
will remain. With<iron-image>
image will just disappear.