Browse Source

BI-39432 && label加了个接口

master
windy 6 years ago
parent
commit
fc1ef82088
  1. 7
      dist/base.js
  2. 10
      dist/bundle.ie.js
  3. 48
      dist/bundle.ie.min.js
  4. 10
      dist/bundle.js
  5. 72
      dist/bundle.min.js
  6. 3
      dist/core.js
  7. 10
      dist/fineui.ie.js
  8. 48
      dist/fineui.ie.min.js
  9. 10
      dist/fineui.js
  10. 72
      dist/fineui.min.js
  11. 10
      dist/fineui_without_jquery_polyfill.js
  12. 2
      dist/utils.min.js
  13. 7
      src/base/single/label/label.js
  14. 3
      src/core/controller/controller.tooltips.js

7
dist/base.js vendored

@ -10788,6 +10788,7 @@ BI.Label = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label", baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center", textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap whiteSpace: "nowrap", // normal or nowrap
wrapAlign: "center", // 换行之后的文本的文本是都需要居中对齐,在textAlign为center时生效
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效 forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null, textWidth: null,
textHeight: null, textHeight: null,
@ -10805,7 +10806,7 @@ BI.Label = BI.inherit(BI.Single, {
_createJson: function () { _createJson: function () {
var o = this.options; var o = this.options;
return { var obj = {
type: "bi.text", type: "bi.text",
textAlign: o.textAlign, textAlign: o.textAlign,
whiteSpace: o.whiteSpace, whiteSpace: o.whiteSpace,
@ -10815,6 +10816,10 @@ BI.Label = BI.inherit(BI.Single, {
py: o.py, py: o.py,
keyword: o.keyword keyword: o.keyword
}; };
if(o.textAlign === "center") {
obj.textAlign = o.wrapAlign;
}
return obj;
}, },
_init: function () { _init: function () {

10
dist/bundle.ie.js vendored

@ -17256,7 +17256,8 @@ BI.TooltipsController = BI.inherit(BI.Controller, {
if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) { if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) {
x -= tooltip.element.outerWidth() + 15; x -= tooltip.element.outerWidth() + 15;
} }
if (y + tooltip.element.outerHeight() > BI.Widget._renderEngine.createElement("body").outerHeight()) { var bodyHeight = BI.Widget._renderEngine.createElement("body").outerHeight();
if (y + tooltip.element.outerHeight() > bodyHeight || (!opt.belowMouse && top + tooltip.element.outerHeight() > bodyHeight)) {
y -= tooltip.element.outerHeight() + 15; y -= tooltip.element.outerHeight() + 15;
!opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5)); !opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5));
} else { } else {
@ -45883,6 +45884,7 @@ BI.Label = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label", baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center", textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap whiteSpace: "nowrap", // normal or nowrap
wrapAlign: "center", // 换行之后的文本的文本是都需要居中对齐,在textAlign为center时生效
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效 forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null, textWidth: null,
textHeight: null, textHeight: null,
@ -45900,7 +45902,7 @@ BI.Label = BI.inherit(BI.Single, {
_createJson: function () { _createJson: function () {
var o = this.options; var o = this.options;
return { var obj = {
type: "bi.text", type: "bi.text",
textAlign: o.textAlign, textAlign: o.textAlign,
whiteSpace: o.whiteSpace, whiteSpace: o.whiteSpace,
@ -45910,6 +45912,10 @@ BI.Label = BI.inherit(BI.Single, {
py: o.py, py: o.py,
keyword: o.keyword keyword: o.keyword
}; };
if(o.textAlign === "center") {
obj.textAlign = o.wrapAlign;
}
return obj;
}, },
_init: function () { _init: function () {

48
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

10
dist/bundle.js vendored

@ -17256,7 +17256,8 @@ BI.TooltipsController = BI.inherit(BI.Controller, {
if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) { if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) {
x -= tooltip.element.outerWidth() + 15; x -= tooltip.element.outerWidth() + 15;
} }
if (y + tooltip.element.outerHeight() > BI.Widget._renderEngine.createElement("body").outerHeight()) { var bodyHeight = BI.Widget._renderEngine.createElement("body").outerHeight();
if (y + tooltip.element.outerHeight() > bodyHeight || (!opt.belowMouse && top + tooltip.element.outerHeight() > bodyHeight)) {
y -= tooltip.element.outerHeight() + 15; y -= tooltip.element.outerHeight() + 15;
!opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5)); !opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5));
} else { } else {
@ -46287,6 +46288,7 @@ BI.Label = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label", baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center", textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap whiteSpace: "nowrap", // normal or nowrap
wrapAlign: "center", // 换行之后的文本的文本是都需要居中对齐,在textAlign为center时生效
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效 forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null, textWidth: null,
textHeight: null, textHeight: null,
@ -46304,7 +46306,7 @@ BI.Label = BI.inherit(BI.Single, {
_createJson: function () { _createJson: function () {
var o = this.options; var o = this.options;
return { var obj = {
type: "bi.text", type: "bi.text",
textAlign: o.textAlign, textAlign: o.textAlign,
whiteSpace: o.whiteSpace, whiteSpace: o.whiteSpace,
@ -46314,6 +46316,10 @@ BI.Label = BI.inherit(BI.Single, {
py: o.py, py: o.py,
keyword: o.keyword keyword: o.keyword
}; };
if(o.textAlign === "center") {
obj.textAlign = o.wrapAlign;
}
return obj;
}, },
_init: function () { _init: function () {

72
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

3
dist/core.js vendored

@ -17256,7 +17256,8 @@ BI.TooltipsController = BI.inherit(BI.Controller, {
if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) { if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) {
x -= tooltip.element.outerWidth() + 15; x -= tooltip.element.outerWidth() + 15;
} }
if (y + tooltip.element.outerHeight() > BI.Widget._renderEngine.createElement("body").outerHeight()) { var bodyHeight = BI.Widget._renderEngine.createElement("body").outerHeight();
if (y + tooltip.element.outerHeight() > bodyHeight || (!opt.belowMouse && top + tooltip.element.outerHeight() > bodyHeight)) {
y -= tooltip.element.outerHeight() + 15; y -= tooltip.element.outerHeight() + 15;
!opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5)); !opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5));
} else { } else {

10
dist/fineui.ie.js vendored

@ -17501,7 +17501,8 @@ BI.TooltipsController = BI.inherit(BI.Controller, {
if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) { if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) {
x -= tooltip.element.outerWidth() + 15; x -= tooltip.element.outerWidth() + 15;
} }
if (y + tooltip.element.outerHeight() > BI.Widget._renderEngine.createElement("body").outerHeight()) { var bodyHeight = BI.Widget._renderEngine.createElement("body").outerHeight();
if (y + tooltip.element.outerHeight() > bodyHeight || (!opt.belowMouse && top + tooltip.element.outerHeight() > bodyHeight)) {
y -= tooltip.element.outerHeight() + 15; y -= tooltip.element.outerHeight() + 15;
!opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5)); !opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5));
} else { } else {
@ -46128,6 +46129,7 @@ BI.Label = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label", baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center", textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap whiteSpace: "nowrap", // normal or nowrap
wrapAlign: "center", // 换行之后的文本的文本是都需要居中对齐,在textAlign为center时生效
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效 forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null, textWidth: null,
textHeight: null, textHeight: null,
@ -46145,7 +46147,7 @@ BI.Label = BI.inherit(BI.Single, {
_createJson: function () { _createJson: function () {
var o = this.options; var o = this.options;
return { var obj = {
type: "bi.text", type: "bi.text",
textAlign: o.textAlign, textAlign: o.textAlign,
whiteSpace: o.whiteSpace, whiteSpace: o.whiteSpace,
@ -46155,6 +46157,10 @@ BI.Label = BI.inherit(BI.Single, {
py: o.py, py: o.py,
keyword: o.keyword keyword: o.keyword
}; };
if(o.textAlign === "center") {
obj.textAlign = o.wrapAlign;
}
return obj;
}, },
_init: function () { _init: function () {

48
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

10
dist/fineui.js vendored

@ -17501,7 +17501,8 @@ BI.TooltipsController = BI.inherit(BI.Controller, {
if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) { if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) {
x -= tooltip.element.outerWidth() + 15; x -= tooltip.element.outerWidth() + 15;
} }
if (y + tooltip.element.outerHeight() > BI.Widget._renderEngine.createElement("body").outerHeight()) { var bodyHeight = BI.Widget._renderEngine.createElement("body").outerHeight();
if (y + tooltip.element.outerHeight() > bodyHeight || (!opt.belowMouse && top + tooltip.element.outerHeight() > bodyHeight)) {
y -= tooltip.element.outerHeight() + 15; y -= tooltip.element.outerHeight() + 15;
!opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5)); !opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5));
} else { } else {
@ -46532,6 +46533,7 @@ BI.Label = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label", baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center", textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap whiteSpace: "nowrap", // normal or nowrap
wrapAlign: "center", // 换行之后的文本的文本是都需要居中对齐,在textAlign为center时生效
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效 forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null, textWidth: null,
textHeight: null, textHeight: null,
@ -46549,7 +46551,7 @@ BI.Label = BI.inherit(BI.Single, {
_createJson: function () { _createJson: function () {
var o = this.options; var o = this.options;
return { var obj = {
type: "bi.text", type: "bi.text",
textAlign: o.textAlign, textAlign: o.textAlign,
whiteSpace: o.whiteSpace, whiteSpace: o.whiteSpace,
@ -46559,6 +46561,10 @@ BI.Label = BI.inherit(BI.Single, {
py: o.py, py: o.py,
keyword: o.keyword keyword: o.keyword
}; };
if(o.textAlign === "center") {
obj.textAlign = o.wrapAlign;
}
return obj;
}, },
_init: function () { _init: function () {

72
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

10
dist/fineui_without_jquery_polyfill.js vendored

@ -17002,7 +17002,8 @@ BI.TooltipsController = BI.inherit(BI.Controller, {
if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) { if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) {
x -= tooltip.element.outerWidth() + 15; x -= tooltip.element.outerWidth() + 15;
} }
if (y + tooltip.element.outerHeight() > BI.Widget._renderEngine.createElement("body").outerHeight()) { var bodyHeight = BI.Widget._renderEngine.createElement("body").outerHeight();
if (y + tooltip.element.outerHeight() > bodyHeight || (!opt.belowMouse && top + tooltip.element.outerHeight() > bodyHeight)) {
y -= tooltip.element.outerHeight() + 15; y -= tooltip.element.outerHeight() + 15;
!opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5)); !opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5));
} else { } else {
@ -33514,6 +33515,7 @@ BI.Label = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label", baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center", textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap whiteSpace: "nowrap", // normal or nowrap
wrapAlign: "center", // 换行之后的文本的文本是都需要居中对齐,在textAlign为center时生效
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效 forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null, textWidth: null,
textHeight: null, textHeight: null,
@ -33531,7 +33533,7 @@ BI.Label = BI.inherit(BI.Single, {
_createJson: function () { _createJson: function () {
var o = this.options; var o = this.options;
return { var obj = {
type: "bi.text", type: "bi.text",
textAlign: o.textAlign, textAlign: o.textAlign,
whiteSpace: o.whiteSpace, whiteSpace: o.whiteSpace,
@ -33541,6 +33543,10 @@ BI.Label = BI.inherit(BI.Single, {
py: o.py, py: o.py,
keyword: o.keyword keyword: o.keyword
}; };
if(o.textAlign === "center") {
obj.textAlign = o.wrapAlign;
}
return obj;
}, },
_init: function () { _init: function () {

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

7
src/base/single/label/label.js

@ -9,6 +9,7 @@ BI.Label = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-label", baseCls: (conf.baseCls || "") + " bi-label",
textAlign: "center", textAlign: "center",
whiteSpace: "nowrap", // normal or nowrap whiteSpace: "nowrap", // normal or nowrap
wrapAlign: "center", // 换行之后的文本的文本是都需要居中对齐,在textAlign为center时生效
forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效 forceCenter: false, // 是否无论如何都要居中, 不考虑超出边界的情况, 在未知宽度和高度时有效
textWidth: null, textWidth: null,
textHeight: null, textHeight: null,
@ -26,7 +27,7 @@ BI.Label = BI.inherit(BI.Single, {
_createJson: function () { _createJson: function () {
var o = this.options; var o = this.options;
return { var obj = {
type: "bi.text", type: "bi.text",
textAlign: o.textAlign, textAlign: o.textAlign,
whiteSpace: o.whiteSpace, whiteSpace: o.whiteSpace,
@ -36,6 +37,10 @@ BI.Label = BI.inherit(BI.Single, {
py: o.py, py: o.py,
keyword: o.keyword keyword: o.keyword
}; };
if(o.textAlign === "center") {
obj.textAlign = o.wrapAlign;
}
return obj;
}, },
_init: function () { _init: function () {

3
src/core/controller/controller.tooltips.js

@ -92,7 +92,8 @@ BI.TooltipsController = BI.inherit(BI.Controller, {
if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) { if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) {
x -= tooltip.element.outerWidth() + 15; x -= tooltip.element.outerWidth() + 15;
} }
if (y + tooltip.element.outerHeight() > BI.Widget._renderEngine.createElement("body").outerHeight()) { var bodyHeight = BI.Widget._renderEngine.createElement("body").outerHeight();
if (y + tooltip.element.outerHeight() > bodyHeight || (!opt.belowMouse && top + tooltip.element.outerHeight() > bodyHeight)) {
y -= tooltip.element.outerHeight() + 15; y -= tooltip.element.outerHeight() + 15;
!opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5)); !opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5));
} else { } else {

Loading…
Cancel
Save