Patternslib/Patterns — pull request #341 by jcbrand (2013-08-23 10:41:32+00:00)
Title: Bugfix. Modal height wasn't being calculated correctly.

The functions `setPosition` and `measure` didn't have access to `$el` on which the
pattern was applicable.

Instead they used jQuery to get the element. The problem occurs when there
are multiple `div.pat-modal` elements in the page. Then there's no way to know
which one is the right one.

The fix is the set the correct `$el` element on the pattern and to access that in
`setPosition` and `measue`. `measure` is called asynchronously, so we have to use `$.proxy` to
make sure it has access to the pattern object.