Closed joemidi closed 7 years ago
The way GSAP interprets strings causes issues when a file name such as cta-300x250.png is being set.
cta-300x250.png
Example
this.cta = this.smartObject({ type: 'img', src: 'cta-300x250.png', alt: 'CTA', width: 200, height: 20, parent: this.banner }); // This produces the following 404 GET error: '.../images/cta-300xNaN.png` 404 (Not Found)
It would be beneficial to delete src and alt from the settings object before all items get set by TweenMax.
src
alt
settings
function applySettings() { if (settings.id) { element.id = settings.id; } if (settings.parent) { settings.parent.appendChild(element); } if (settings.innerHTML) { element.innerHTML = settings.innerHTML; } delete settings.innerHTML; delete settings.retina; delete settings.parent; delete settings.id; delete settings.type; delete settings.autoplay; delete settings.loop; delete settings.controls; delete settings.muted; delete settings.poster; delete settings.preload; delete settings.sources; delete settings.src; delete settings.alt; TweenLite.set(element, settings); }
The way GSAP interprets strings causes issues when a file name such as
cta-300x250.png
is being set.Example
It would be beneficial to delete
src
andalt
from thesettings
object before all items get set by TweenMax.