The-M-Project
The-M-Project copied to clipboard
Flexible ImageView
Hi,
Can we have a more flexible ImageView that accepts as value a String or a Function ?
Here an example of patch for the render method:
/**
* Renders an image view based on the specified layout.
*
* @private
* @returns {String} The image view's html representation.
*/
render: function() {
this.computeValue();
this.html += '<img id="' + this.id + '" src="' + ($.isFunction(this.value) ? this.value() : this.value) + '"' + this.style() + '>';
return this.html;
}
Cheers
Julien Roche