FIX: Upwards scrolling. Updates ember-cloaking
This commit is contained in:
parent
379f4a87d5
commit
7baa8ea0af
|
@ -82,6 +82,7 @@
|
||||||
slackRatio=slackRatio
|
slackRatio=slackRatio
|
||||||
loadingHTML=controller.loadingHTML
|
loadingHTML=controller.loadingHTML
|
||||||
preservesContext="true"
|
preservesContext="true"
|
||||||
|
uncloakDefault="true"
|
||||||
offsetFixed="header"}}
|
offsetFixed="header"}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,8 @@
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
var cloakView = this.get('cloakView'),
|
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
|
// Set the slack ratio differently to allow for more or less slack in preloading
|
||||||
var slackRatio = parseFloat(this.get('slackRatio'));
|
var slackRatio = parseFloat(this.get('slackRatio'));
|
||||||
|
@ -33,6 +34,11 @@
|
||||||
if (idProperty) {
|
if (idProperty) {
|
||||||
this.set('elementId', cloakView + '-cloak-' + this.get('content.' + 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({
|
Ember.CloakedView = Ember.View.extend({
|
||||||
attributeBindings: ['style'],
|
attributeBindings: ['style'],
|
||||||
|
|
||||||
init: function() {
|
|
||||||
this._super();
|
|
||||||
this.cloak();
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Triggers the set up for rendering a view that is cloaked.
|
Triggers the set up for rendering a view that is cloaked.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue