[DE][PE] Refactoring lock-tooltip for long username
This commit is contained in:
parent
607964d068
commit
dd5436ba26
|
@ -556,12 +556,13 @@ define([
|
||||||
ToolTip = getUserName(moveData.get_UserId());
|
ToolTip = getUserName(moveData.get_UserId());
|
||||||
|
|
||||||
showPoint = [moveData.get_X()+me._XY[0], moveData.get_Y()+me._XY[1]];
|
showPoint = [moveData.get_X()+me._XY[0], moveData.get_Y()+me._XY[1]];
|
||||||
|
var maxwidth = showPoint[0];
|
||||||
showPoint[0] = me._BodyWidth - showPoint[0];
|
showPoint[0] = me._BodyWidth - showPoint[0];
|
||||||
showPoint[1] -= ((moveData.get_LockedObjectType()==2) ? me._TtHeight : 0);
|
showPoint[1] -= ((moveData.get_LockedObjectType()==2) ? me._TtHeight : 0);
|
||||||
|
|
||||||
if (showPoint[1] > me._XY[1] && showPoint[1]+me._TtHeight < me._XY[1]+me._Height) {
|
if (showPoint[1] > me._XY[1] && showPoint[1]+me._TtHeight < me._XY[1]+me._Height) {
|
||||||
src.text(ToolTip);
|
src.text(ToolTip);
|
||||||
src.css({visibility: 'visible', top: showPoint[1] + 'px', right: showPoint[0] + 'px'});
|
src.css({visibility: 'visible', top: showPoint[1] + 'px', right: showPoint[0] + 'px', 'max-width': maxwidth + 'px'});
|
||||||
} else {
|
} else {
|
||||||
src.css({visibility: 'hidden'});
|
src.css({visibility: 'hidden'});
|
||||||
}
|
}
|
||||||
|
|
|
@ -401,6 +401,8 @@
|
||||||
font: 11px arial;
|
font: 11px arial;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
#id-toolbar-menu-auto-fontcolor > a.selected {
|
#id-toolbar-menu-auto-fontcolor > a.selected {
|
||||||
|
|
|
@ -530,12 +530,13 @@ define([
|
||||||
ToolTip = getUserName(moveData.get_UserId());
|
ToolTip = getUserName(moveData.get_UserId());
|
||||||
|
|
||||||
showPoint = [moveData.get_X()+me._XY[0], moveData.get_Y()+me._XY[1]];
|
showPoint = [moveData.get_X()+me._XY[0], moveData.get_Y()+me._XY[1]];
|
||||||
|
var maxwidth = showPoint[0];
|
||||||
showPoint[0] = me._BodyWidth - showPoint[0];
|
showPoint[0] = me._BodyWidth - showPoint[0];
|
||||||
showPoint[1] -= ((moveData.get_LockedObjectType()==2) ? me._TtHeight : 0);
|
showPoint[1] -= ((moveData.get_LockedObjectType()==2) ? me._TtHeight : 0);
|
||||||
|
|
||||||
if (showPoint[1] > me._XY[1] && showPoint[1]+me._TtHeight < me._XY[1]+me._Height) {
|
if (showPoint[1] > me._XY[1] && showPoint[1]+me._TtHeight < me._XY[1]+me._Height) {
|
||||||
src.text(ToolTip);
|
src.text(ToolTip);
|
||||||
src.css({visibility: 'visible', top: showPoint[1] + 'px', right: showPoint[0] + 'px'});
|
src.css({visibility: 'visible', top: showPoint[1] + 'px', right: showPoint[0] + 'px', 'max-width': maxwidth + 'px'});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/** coauthoring end **/
|
/** coauthoring end **/
|
||||||
|
|
|
@ -341,6 +341,8 @@
|
||||||
font: 11px arial;
|
font: 11px arial;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-equation {
|
.item-equation {
|
||||||
|
|
Loading…
Reference in a new issue