tbranyen/backbone.layoutmanager — pull request #300 by SBoudrias (2013-02-18 16:27:45+00:00)
Title: Fix view duplication when rerendering full template

This happens with view with multiple top level elements (fixes bug #299)

The code right now by calling `replaceWith` was looping through all `this.$el` elements, duplicating the views each time it was rerendered. So I just removed the extra elements and replace the first one with the new view. I think right now this is needed as we only have access to the previous `$el` to determine the position of the view in the DOM (But I don't find it really elegant).