[DE PE SSE] Fix menu position for RTL
This commit is contained in:
parent
e675e9ba1b
commit
0ff293c37e
|
@ -670,6 +670,8 @@ define([
|
|||
left = 0;
|
||||
}
|
||||
}
|
||||
if (left < 0)
|
||||
left = 0;
|
||||
|
||||
if (this.options.restoreHeightAndTop) { // can change top position, if top<0 - then change menu height
|
||||
var cg = Common.Utils.croppedGeometry();
|
||||
|
@ -1181,6 +1183,8 @@ define([
|
|||
left = 0;
|
||||
}
|
||||
}
|
||||
if (left < 0)
|
||||
left = 0;
|
||||
|
||||
if (this.options.restoreHeight) {
|
||||
if (typeof (this.options.restoreHeight) == "number") {
|
||||
|
|
|
@ -2442,6 +2442,9 @@ define([
|
|||
eqContainer.css({left: showPoint[0], top : showPoint[1]});
|
||||
|
||||
var menuAlign = (me._Height - showPoint[1] - eqContainer.outerHeight() < 220) ? 'bl-tl' : 'tl-bl';
|
||||
if (Common.UI.isRTL()) {
|
||||
menuAlign = menuAlign === 'bl-tl' ? 'br-tr' : 'tr-br';
|
||||
}
|
||||
me.equationBtns.forEach(function(item){
|
||||
item && (item.menu.menuAlign = menuAlign);
|
||||
});
|
||||
|
|
|
@ -219,7 +219,7 @@ define([
|
|||
|
||||
this.showSignatureMenu(record, showPoint);
|
||||
|
||||
menu.menuAlign = 'tl-bl';
|
||||
menu.menuAlign = Common.UI.isRTL() ? 'tr-br' : 'tl-bl';
|
||||
menu.menuAlignEl = null;
|
||||
menu.setOffset(15, 5);
|
||||
menu.show();
|
||||
|
@ -246,7 +246,7 @@ define([
|
|||
|
||||
this.showSignatureMenu(record, showPoint);
|
||||
|
||||
menu.menuAlign = 'tr-br';
|
||||
menu.menuAlign = Common.UI.isRTL() ? 'tl-bl' : 'tr-br';
|
||||
menu.menuAlignEl = currentTarget;
|
||||
menu.setOffset(-20, -currentTarget.height()/2 + 3);
|
||||
menu.show();
|
||||
|
|
|
@ -2355,6 +2355,9 @@ define([
|
|||
eqContainer.css({left: showPoint[0], top : showPoint[1]});
|
||||
|
||||
var menuAlign = (me._Height - showPoint[1] - eqContainer.outerHeight() < 220) ? 'bl-tl' : 'tl-bl';
|
||||
if (Common.UI.isRTL()) {
|
||||
menuAlign = menuAlign === 'bl-tl' ? 'br-tr' : 'tr-br';
|
||||
}
|
||||
me.equationBtns.forEach(function(item){
|
||||
item && (item.menu.menuAlign = menuAlign);
|
||||
});
|
||||
|
|
|
@ -188,7 +188,7 @@ define([
|
|||
|
||||
this.showSignatureMenu(record, showPoint);
|
||||
|
||||
menu.menuAlign = 'tl-bl';
|
||||
menu.menuAlign = Common.UI.isRTL() ? 'tr-br' : 'tl-bl';
|
||||
menu.menuAlignEl = null;
|
||||
menu.setOffset(15, 5);
|
||||
menu.show();
|
||||
|
@ -215,7 +215,7 @@ define([
|
|||
|
||||
this.showSignatureMenu(record, showPoint);
|
||||
|
||||
menu.menuAlign = 'tr-br';
|
||||
menu.menuAlign = Common.UI.isRTL() ? 'tl-bl' : 'tr-br';
|
||||
menu.menuAlignEl = currentTarget;
|
||||
menu.setOffset(-20, -currentTarget.height()/2 + 3);
|
||||
menu.show();
|
||||
|
|
|
@ -2609,6 +2609,9 @@ define([
|
|||
|
||||
menuContainer.css({left: showPoint[0], top : showPoint[1]});
|
||||
menu.menuAlign = validation ? 'tr-br' : 'tl-bl';
|
||||
if (Common.UI.isRTL()) {
|
||||
menu.menuAlign = menu.menuAlign === 'tr-br' ? 'tl-bl' : 'tr-br';
|
||||
}
|
||||
|
||||
me._preventClick = validation;
|
||||
validation && menuContainer.attr('data-value', 'prevent-canvas-click');
|
||||
|
@ -4373,6 +4376,9 @@ define([
|
|||
eqContainer.css({left: showPoint[0], top : showPoint[1]});
|
||||
|
||||
var menuAlign = (me.tooltips.coauth.apiHeight - showPoint[1] - eqContainer.outerHeight() < 220) ? 'bl-tl' : 'tl-bl';
|
||||
if (Common.UI.isRTL()) {
|
||||
menuAlign = menuAlign === 'bl-tl' ? 'br-tr' : 'tr-br';
|
||||
}
|
||||
me.equationBtns.forEach(function(item){
|
||||
item && (item.menu.menuAlign = menuAlign);
|
||||
});
|
||||
|
|
|
@ -214,7 +214,7 @@ define([
|
|||
|
||||
this.showSignatureMenu(record, showPoint);
|
||||
|
||||
menu.menuAlign = 'tl-bl';
|
||||
menu.menuAlign = Common.UI.isRTL() ? 'tr-br' : 'tl-bl';
|
||||
menu.menuAlignEl = null;
|
||||
menu.setOffset(15, 5);
|
||||
menu.show();
|
||||
|
@ -241,7 +241,7 @@ define([
|
|||
|
||||
this.showSignatureMenu(record, showPoint);
|
||||
|
||||
menu.menuAlign = 'tr-br';
|
||||
menu.menuAlign = Common.UI.isRTL() ? 'tl-bl' : 'tr-br';
|
||||
menu.menuAlignEl = currentTarget;
|
||||
menu.setOffset(-20, -currentTarget.height()/2 + 3);
|
||||
menu.show();
|
||||
|
|
Loading…
Reference in a new issue