[SSE] Header/Footer: scroll canvas to top when select different pages

This commit is contained in:
Julia Radzhabova 2019-05-20 12:08:55 +03:00
parent f4e174ac90
commit 4c3e134b11

View file

@ -701,6 +701,12 @@ define([
}
},
scrollerScrollTop: function() {
for (var name in this.scrollers) {
this.scrollers[name] && this.scrollers[name].scrollTop(0);
}
},
onCanvasClick: function(id, event){
if (!this.HFObject) return;
id = id || '#header-left-img';
@ -817,7 +823,6 @@ define([
}
},
onTextColor: function() {
var mnuTextColorPicker = this.mnuTextColorPicker[this.isFooter ? 1 : 0];
mnuTextColorPicker.trigger('select', mnuTextColorPicker, mnuTextColorPicker.currentColor, true);
@ -836,7 +841,8 @@ define([
onPageTypeToggle: function(type, btn, state) {
if (state && this.HFObject) {
this.HFObject.switchHeaderFooterType(type);
this.onCanvasClick(this.currentCanvas);
this.scrollerScrollTop();
this.onCanvasClick(this.currentCanvas, undefined, true);
}
},