Using enyo.flyweightRepeater with orient:"h"

I am trying to use enyo.flyweightRepeater with orient:"h", to create something similar to notches on a ruler. I need to get the :left positioning of every notch as they are being created. So I tried the following, but the .getBounds() properties always come up empty. Any help would be appreciated.
	name: "Tick",	
	published: {
		number : 50
	components: [
			kind: "FlyweightRepeater", 
			//onRenderRow: "renderTick",			 
        components: [
                    	 styles: " width:3px;border-left: 1px solid grey;height: 10px;",                   	 
	numberChanged: function(){
		var f = this.$.flyweightRepeater;
		f.setCount ( 30);
	renderTick: function(inSender, inEvent){
	setupTick: function(inSender, inEvent){
		return true
	create: function(){
		this.inherited( arguments );


  • With the flyweight repeater, the internal components are rendered over and over to the DOM. However, after an item is rendered to the DOM, the item is detatched again before setupItem is called again. So at that time, there's nothing that we can measure the bounds of.

    In fact, the usual way of the flyweight is all the instances are actually rendered to a string, then there's just one modification of innerHtml at the end.
  • Do you have a suggestion?
  • You don't indicate what you're using getBounds for -- I assume it's not just to log to the console.
  • What lies on top of the many repeated controls is a draggable item. I want to create an event to fire whenever the draggable items left edge crosses any of the repeater items left edge. Sought of like a ruler with a slide. Does that make any sense to you?
  • edited March 2014
    Got it. Decided to do it in the rendered function. I'll just iterate the count on the repeater with:
Sign In or Register to comment.