balderdashy / mast

UI conventions built on top of Backbone.JS
MIT License
81 stars 14 forks source link

todo: fix bug #133

Closed mikermcneil closed 10 years ago

mikermcneil commented 10 years ago
Component constructor
// Keep track of a counter for use in generating 
    // ids for anonymous components.
    this.anonymousRegionCounter = 0;
Component.prototype._renderRegions
// If region has no id, generate a unique region id w/i this component
      // that is unlikely to collide with my other named regions
      var thisComponent = self;
      if (!region.id) {
        region.id = ''+
          Framework.id +
          '__anonymous_region__' + 
          thisComponent.anonymousRegionCounter;
        // Increment counter for next time
        self.anonymousRegionCounter++;
      }