imgResponsive: true,
border: '',
- src: '',
+ src: 'about:blank',
href: false,
target: false,
xsUrl: '',
var cfg = {
tag: 'img',
cls: (this.imgResponsive) ? 'img-responsive' : '',
- html : null
+ html : null,
+ src : 'about:blank' // just incase src get's set to undefined?!?
};
cfg.html = this.html || cfg.html;
{
Roo.log('img onclick');
this.fireEvent('click', this, e);
+ },
+ /**
+ * Sets the url of the image - used to update it
+ * @param {String} url the url of the image
+ */
+
+ setSrc : function(url)
+ {
+ this.src = url;
+
+ if(this.src || (!this.xsUrl && !this.smUrl && !this.mdUrl && !this.lgUrl)){
+ this.el.dom.src = url;
+ return;
+ }
+
+ this.el.select('img', true).first().dom.src = url;
}
+
+
});