Created
September 28, 2010 21:43
-
-
Save hvgotcodes/601850 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render: function(context, firstTime) { | |
var hints = this.get('hints'); | |
console.log('render content %@'.fmt(hints)); | |
var hHeight = this.get('hintHeight'); | |
var hWidth = this.get('hintWidth'); | |
if (hints) { | |
hints.forEach(function(item, i) { | |
var top = 0; | |
var left = ((i % 3) + 1) * hWidth; | |
var style = 'position:relative; height:%@;width:%@;top:%@;left:%@;'.fmt(hHeight, hWidth, 0, left); | |
context = context. | |
begin('div'). | |
addClass('hint'). | |
attr('style', style). | |
attr('id', '%@-%@'.fmt(SC.guidFor(this), i)). | |
push(item.get('hint')). | |
end(); | |
}); | |
} | |
sc_super(); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment