balderdashy / mast

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

Region .prepend #131

Closed particlebanana closed 10 years ago

particlebanana commented 10 years ago

There should be a prepend method to compliment append when attaching child views.

mikermcneil commented 10 years ago

Try this.regionName.insert()

On Mon, Oct 7, 2013 at 7:03 PM, Cody Stoltman notifications@github.comwrote:

There should be a prepend method to compliment append when attaching child views.

— Reply to this email directly or view it on GitHubhttps://github.com/balderdashy/mast/issues/131 .

Mike McNeil Founder http://www.linkedin.com/in/mikermcneil/ http://twitter.com/mikermcneil http://github.com/balderdashy

   C      O
  NFI    DEN
  TIA   L i
  nfo  rma
  tion in
   tended
only for t      he addressee(s).

If you are not the intended recipient, empl oyee or agent responsible for delivery to the intended recipient(s), please be aware that any review, dissemination, use,distribut ion or copying of this message and its contents is strictly prohibited. If you receive this email in error, ple ase notify the sender and destroy any paper or electronic copies immediately.

particlebanana commented 10 years ago

That works if you pass the array index to insert at. .insert(0, 'myAwesomeComponent', { foo: 'bar' });

mikermcneil commented 10 years ago

I'd say this.regionName.prepend() is still worth adding as a convenience method-- need to switch master over to @ghernandez345's branch first though and make sure the fixes there have been rebased. I think I got all but the last one