The-M-Project icon indicating copy to clipboard operation
The-M-Project copied to clipboard

Flexible ImageView

Open rochejul opened this issue 13 years ago • 0 comments

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

rochejul avatar Oct 03 '12 16:10 rochejul