Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

Flexible ImageView #83

Open
rochejul opened this issue Oct 3, 2012 · 0 comments
Open

Flexible ImageView #83

rochejul opened this issue Oct 3, 2012 · 0 comments

Comments

@rochejul
Copy link

rochejul commented Oct 3, 2012

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant