Partial translation of the Projection.js code to Ext JS.