FIX: Upwards scrolling. Updates ember-cloaking

This commit is contained in:
Robin Ward 2014-03-31 14:32:32 -04:00
parent 379f4a87d5
commit 7baa8ea0af
2 changed files with 8 additions and 6 deletions

View File

@ -82,6 +82,7 @@
slackRatio=slackRatio
loadingHTML=controller.loadingHTML
preservesContext="true"
uncloakDefault="true"
offsetFixed="header"}}
{{/unless}}

View File

@ -14,7 +14,8 @@
init: function() {
var cloakView = this.get('cloakView'),
idProperty = this.get('idProperty');
idProperty = this.get('idProperty'),
uncloakDefault = !!this.get('uncloakDefault');
// Set the slack ratio differently to allow for more or less slack in preloading
var slackRatio = parseFloat(this.get('slackRatio'));
@ -33,6 +34,11 @@
if (idProperty) {
this.set('elementId', cloakView + '-cloak-' + this.get('content.' + idProperty));
}
if (uncloakDefault) {
this.uncloak();
} else {
this.cloak();
}
}
}));
@ -219,11 +225,6 @@
Ember.CloakedView = Ember.View.extend({
attributeBindings: ['style'],
init: function() {
this._super();
this.cloak();
},
/**
Triggers the set up for rendering a view that is cloaked.