mirror of https://github.com/keeweb/keeweb.git
removed some view methods
This commit is contained in:
parent
5cd19cee56
commit
bc808889a1
|
@ -33,7 +33,7 @@ const Scrollable = {
|
|||
// }
|
||||
if (this.scroll) {
|
||||
this.scroll.update();
|
||||
this.requestAnimationFrame(function() {
|
||||
requestAnimationFrame(() => {
|
||||
if (this.scroll) {
|
||||
this.scroll.update();
|
||||
const barHeight = this.scrollerBar.height();
|
||||
|
|
|
@ -34,17 +34,7 @@ _.extend(Backbone.View.prototype, {
|
|||
},
|
||||
|
||||
afterPaint(callback) {
|
||||
this.requestAnimationFrame(function() {
|
||||
this.requestAnimationFrame(callback);
|
||||
});
|
||||
},
|
||||
|
||||
setTimeout(callback) {
|
||||
setTimeout(callback.bind(this), 0);
|
||||
},
|
||||
|
||||
requestAnimationFrame(callback) {
|
||||
requestAnimationFrame(callback.bind(this));
|
||||
requestAnimationFrame(() => requestAnimationFrame(callback));
|
||||
},
|
||||
|
||||
renderTemplate(model, replace) {
|
||||
|
@ -94,10 +84,6 @@ _.extend(Backbone.View.prototype, {
|
|||
});
|
||||
this.views = {};
|
||||
}
|
||||
},
|
||||
|
||||
deferRender() {
|
||||
_.defer(this.render.bind(this));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -408,7 +408,7 @@ const DetailsView = Backbone.View.extend({
|
|||
this.views.dropdownView.remove();
|
||||
this.views.dropdownView = null;
|
||||
} else {
|
||||
this.setTimeout(function() {
|
||||
setTimeout(() => {
|
||||
const dropdownView = new DropdownView();
|
||||
this.listenTo(dropdownView, 'cancel', this.toggleMoreOptions);
|
||||
this.listenTo(dropdownView, 'select', this.moreOptionsSelect);
|
||||
|
|
|
@ -156,9 +156,7 @@ const FieldViewCustom = FieldViewText.extend({
|
|||
if (this.labelInput) {
|
||||
this.endEditTitle(this.labelInput.val());
|
||||
}
|
||||
this.setTimeout(function() {
|
||||
this.input.focus();
|
||||
});
|
||||
setTimeout(() => this.input.focus());
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -55,11 +55,9 @@ const SettingsFileView = Backbone.View.extend({
|
|||
appModel: null,
|
||||
|
||||
initialize() {
|
||||
this.listenTo(
|
||||
this.model,
|
||||
'change:syncing change:syncError change:syncDate',
|
||||
this.deferRender
|
||||
);
|
||||
this.listenTo(this.model, 'change:syncing change:syncError change:syncDate', () => {
|
||||
setTimeout(() => this.render(), 0);
|
||||
});
|
||||
},
|
||||
|
||||
render() {
|
||||
|
|
Loading…
Reference in New Issue