diff --git a/dist/samples/advanced-markers-animation/app/index.ts b/dist/samples/advanced-markers-animation/app/index.ts index 7290eb62..66699ade 100644 --- a/dist/samples/advanced-markers-animation/app/index.ts +++ b/dist/samples/advanced-markers-animation/app/index.ts @@ -87,7 +87,7 @@ }); content.style.opacity = '0'; - content.addEventListener('animationend', (event) => { + content.addListener('animationend', (event) => { content.classList.remove('drop'); content.style.opacity = '1'; }); @@ -108,4 +108,4 @@ } initMap(); -// [END maps_advanced_markers_animation] \ No newline at end of file +// [END maps_advanced_markers_animation] diff --git a/dist/samples/advanced-markers-animation/dist/assets/index-8dMt4WQJ.js b/dist/samples/advanced-markers-animation/dist/assets/index-DWiWq4Ww.js similarity index 82% rename from dist/samples/advanced-markers-animation/dist/assets/index-8dMt4WQJ.js rename to dist/samples/advanced-markers-animation/dist/assets/index-DWiWq4Ww.js index d40a98cc..1a810ccd 100644 --- a/dist/samples/advanced-markers-animation/dist/assets/index-8dMt4WQJ.js +++ b/dist/samples/advanced-markers-animation/dist/assets/index-DWiWq4Ww.js @@ -2,4 +2,4 @@ * @license * Copyright 2025 Google LLC. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 - */function d(o){const n=o.getBounds(),r=n.getSouthWest().lat(),i=n.getSouthWest().lng(),e=n.getNorthEast().lat(),t=n.getNorthEast().lng(),s=e-r;let a=t-i;return t{for(const n of o)n.isIntersecting&&(n.target.classList.add("drop"),c.unobserve(n.target))});async function l(){const{Map:o}=await google.maps.importLibrary("maps"),{AdvancedMarkerElement:n,PinElement:r}=await google.maps.importLibrary("marker"),i={lat:37.4242011827985,lng:-122.09242296450893},e=new o(document.getElementById("map"),{zoom:14,center:i,mapId:"4504f8b37365c3d0"});google.maps.event.addListenerOnce(e,"idle",()=>{for(let a=0;a<100;a++)m(e,n,r)});const t=document.createElement("div"),s=document.createElement("button");s.classList.add("ui-button"),s.innerText="Reset the example",s.addEventListener("click",()=>{p()}),t.appendChild(s),e.controls[google.maps.ControlPosition.TOP_CENTER].push(t)}function m(o,n,r){const e=new r().element;new n({position:d(o),map:o,content:e}),e.style.opacity="0",e.addEventListener("animationend",s=>{e.classList.remove("drop"),e.style.opacity="1"});const t=2+Math.random();e.style.setProperty("--delay-time",t+"s"),c.observe(e)}function p(){const o=document.getElementById("mapContainer");document.getElementById("map").remove();const r=document.createElement("div");r.id="map",o.appendChild(r),l()}l(); + */function d(o){const n=o.getBounds(),r=n.getSouthWest().lat(),i=n.getSouthWest().lng(),e=n.getNorthEast().lat(),t=n.getNorthEast().lng(),s=e-r;let a=t-i;return t{for(const n of o)n.isIntersecting&&(n.target.classList.add("drop"),c.unobserve(n.target))});async function l(){const{Map:o}=await google.maps.importLibrary("maps"),{AdvancedMarkerElement:n,PinElement:r}=await google.maps.importLibrary("marker"),i={lat:37.4242011827985,lng:-122.09242296450893},e=new o(document.getElementById("map"),{zoom:14,center:i,mapId:"4504f8b37365c3d0"});google.maps.event.addListenerOnce(e,"idle",()=>{for(let a=0;a<100;a++)m(e,n,r)});const t=document.createElement("div"),s=document.createElement("button");s.classList.add("ui-button"),s.innerText="Reset the example",s.addEventListener("click",()=>{p()}),t.appendChild(s),e.controls[google.maps.ControlPosition.TOP_CENTER].push(t)}function m(o,n,r){const e=new r().element;new n({position:d(o),map:o,content:e}),e.style.opacity="0",e.addListener("animationend",s=>{e.classList.remove("drop"),e.style.opacity="1"});const t=2+Math.random();e.style.setProperty("--delay-time",t+"s"),c.observe(e)}function p(){const o=document.getElementById("mapContainer");document.getElementById("map").remove();const r=document.createElement("div");r.id="map",o.appendChild(r),l()}l(); diff --git a/dist/samples/advanced-markers-animation/dist/index.html b/dist/samples/advanced-markers-animation/dist/index.html index ccaac290..236c050a 100644 --- a/dist/samples/advanced-markers-animation/dist/index.html +++ b/dist/samples/advanced-markers-animation/dist/index.html @@ -9,7 +9,7 @@ Advanced Markers CSS Animation - + diff --git a/dist/samples/advanced-markers-animation/docs/index.js b/dist/samples/advanced-markers-animation/docs/index.js index 9669fd9e..9942274c 100644 --- a/dist/samples/advanced-markers-animation/docs/index.js +++ b/dist/samples/advanced-markers-animation/docs/index.js @@ -75,7 +75,7 @@ function createMarker(map, AdvancedMarkerElement, PinElement) { content: content, }); content.style.opacity = '0'; - content.addEventListener('animationend', (event) => { + content.addListener('animationend', (event) => { content.classList.remove('drop'); content.style.opacity = '1'; }); diff --git a/dist/samples/advanced-markers-animation/docs/index.ts b/dist/samples/advanced-markers-animation/docs/index.ts index 7290eb62..66699ade 100644 --- a/dist/samples/advanced-markers-animation/docs/index.ts +++ b/dist/samples/advanced-markers-animation/docs/index.ts @@ -87,7 +87,7 @@ }); content.style.opacity = '0'; - content.addEventListener('animationend', (event) => { + content.addListener('animationend', (event) => { content.classList.remove('drop'); content.style.opacity = '1'; }); @@ -108,4 +108,4 @@ } initMap(); -// [END maps_advanced_markers_animation] \ No newline at end of file +// [END maps_advanced_markers_animation] diff --git a/dist/samples/advanced-markers-animation/jsfiddle/demo.js b/dist/samples/advanced-markers-animation/jsfiddle/demo.js index 49ce4b08..c7f2c027 100644 --- a/dist/samples/advanced-markers-animation/jsfiddle/demo.js +++ b/dist/samples/advanced-markers-animation/jsfiddle/demo.js @@ -75,7 +75,7 @@ function createMarker(map, AdvancedMarkerElement, PinElement) { content: content, }); content.style.opacity = '0'; - content.addEventListener('animationend', (event) => { + content.addListener('animationend', (event) => { content.classList.remove('drop'); content.style.opacity = '1'; });