Browse Source

conflict

es6
windy 4 years ago
parent
commit
6d17339cd7
  1. 1
      changelog.md
  2. 2
      dist/2.0/fineui.css
  3. 4
      dist/2.0/fineui.ie.min.js
  4. 2
      dist/2.0/fineui.ie.min.js.map
  5. 113
      dist/2.0/fineui.js
  6. 2
      dist/2.0/fineui.js.map
  7. 2
      dist/2.0/fineui.min.css
  8. 4
      dist/2.0/fineui.min.js
  9. 2
      dist/2.0/fineui.min.js.map
  10. 2
      dist/2.0/fineui_without_normalize.css
  11. 2
      dist/2.0/fineui_without_normalize.min.css
  12. 2
      dist/bundle.min.css
  13. 4
      dist/bundle.min.js
  14. 2
      dist/bundle.min.js.map
  15. 2
      dist/demo.css
  16. 113
      dist/demo.js
  17. 2
      dist/demo.js.map
  18. 2
      dist/fineui.css
  19. 4
      dist/fineui.ie.min.js
  20. 2
      dist/fineui.ie.min.js.map
  21. 113
      dist/fineui.js
  22. 2
      dist/fineui.js.map
  23. 2
      dist/fineui.min.css
  24. 4
      dist/fineui.min.js
  25. 2
      dist/fineui.min.js.map
  26. 113
      dist/fineui_without_jquery_polyfill.js
  27. 2
      dist/fineui_without_jquery_polyfill.js.map
  28. 2
      dist/font.css
  29. 9
      dist/utils.js
  30. 2
      dist/utils.js.map
  31. 4
      dist/utils.min.js
  32. 2
      dist/utils.min.js.map
  33. 2
      package.json
  34. 15
      src/base/single/label/label.js
  35. 64
      src/core/controller/controller.bubbles.js
  36. 6
      src/core/utils/tree.js
  37. 24
      src/widget/multilayerdownlist/combo.downlist.js

1
changelog.md

@ -1,6 +1,7 @@
# 更新日志
2.0(2020-09)
- 修复同步复选下拉框系列setValue所有值后触发器不显示全选的问题
- BI.Tree.traversal方法迭代函数增加父节点参数
2.0(2020-08)
- bi.sign_editor支持显示值居左/居中/居右显示

2
dist/2.0/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

113
dist/2.0/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2020-9-8 18:00:18 */
/*! time: 2020-9-14 13:02:03 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -9348,21 +9348,22 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
},
traversal: function (array, callback) {
traversal: function (array, callback, pNode) {
if (BI.isNull(array)) {
return;
}
var self = this;
BI.some(array, function (i, item) {
if (callback(i, item) === false) {
if (callback(i, item, pNode) === false) {
return true;
}
self.traversal(item.children, callback);
self.traversal(item.children, callback, item);
});
}
});
})();
/***/ }),
/* 121 */
/***/ (function(module, exports) {
@ -15479,14 +15480,16 @@ BI.BubblesController = BI.inherit(BI.Controller, {
_init: function () {
BI.BubblesController.superclass._init.apply(this, arguments);
var self = this;
this.fixedBubblesManager = {};
this.fixedStoreBubbles = {};
this.bubblesManager = {};
this.storeBubbles = {};
BI.Resizers.add("bubbleController" + BI.uniqueId(), function () {
BI.each(self.bubblesManager, function (name) {
BI.each(self.fixedBubblesManager, function (name) {
self.remove(name);
});
self.bubblesManager = {};
self.storeBubbles = {};
self.fixedBubblesManager = {};
self.fixedStoreBubbles = {};
});
},
@ -15577,6 +15580,8 @@ BI.BubblesController = BI.inherit(BI.Controller, {
var adjustYOffset = opt.adjustYOffset || 0;
var adjustXOffset = opt.adjustXOffset || 0;
var fixed = opt.fixed !== false;
// 如果是非固定位置(fixed)的bubble
if (fixed === false) {
if (!this.storeBubbles[name]) {
this.storeBubbles[name] = {};
}
@ -15591,9 +15596,6 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}]
});
this.set(name, this.storeBubbles[name]["top"]);
// 如果是非固定位置(fixed)的bubble
if (fixed === false) {
var bubble = this.storeBubbles[name]["top"];
var bounds = bubble.element.bounds();
if (BI.DOM.isTopSpaceEnough(context, this.get(name), adjustYOffset)) {
@ -15642,36 +15644,50 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}
}
} else {
if (!this.fixedStoreBubbles[name]) {
this.fixedStoreBubbles[name] = {};
}
if (!this.fixedStoreBubbles[name]["top"]) {
this.fixedStoreBubbles[name]["top"] = this._createBubble("top", text, level, null, fixed);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.fixedStoreBubbles[name]["top"]
}]
});
this.set(name, this.fixedStoreBubbles[name]["top"]);
var position = this._getTopPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left + adjustXOffset, top: position.top - adjustYOffset});
if (!BI.DOM.isTopSpaceEnough(context, this.get(name), adjustYOffset)) {
this.get(name).invisible();
if (!this.storeBubbles[name]["bottom"]) {
this.storeBubbles[name]["bottom"] = this._createBubble("bottom", text, level);
if (!this.fixedStoreBubbles[name]["bottom"]) {
this.fixedStoreBubbles[name]["bottom"] = this._createBubble("bottom", text, level);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.storeBubbles[name]["bottom"]
el: this.fixedStoreBubbles[name]["bottom"]
}]
});
this.set(name, this.storeBubbles[name]["bottom"]);
this.set(name, this.fixedStoreBubbles[name]["bottom"]);
var position = this._getBottomPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left + adjustXOffset, top: position.top + adjustYOffset});
if (!BI.DOM.isBottomSpaceEnough(context, this.get(name), adjustYOffset)) {
this.get(name).invisible();
if (!this.storeBubbles[name]["right"]) {
this.storeBubbles[name]["right"] = this._createBubble("right", text, level);
if (!this.fixedStoreBubbles[name]["right"]) {
this.fixedStoreBubbles[name]["right"] = this._createBubble("right", text, level);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.storeBubbles[name]["right"]
el: this.fixedStoreBubbles[name]["right"]
}]
});
this.set(name, this.storeBubbles[name]["right"]);
this.set(name, this.fixedStoreBubbles[name]["right"]);
var position = this._getRightPosition(name, context, offsetStyle);
this.get(name).element.css({
left: position.left + adjustXOffset,
@ -15679,17 +15695,17 @@ BI.BubblesController = BI.inherit(BI.Controller, {
});
if (!BI.DOM.isRightSpaceEnough(context, this.get(name), adjustXOffset)) {
this.get(name).invisible();
if (!this.storeBubbles[name]["left"]) {
this.storeBubbles[name]["left"] = this._createBubble("left", text, level, 30);
if (!this.fixedStoreBubbles[name]["left"]) {
this.fixedStoreBubbles[name]["left"] = this._createBubble("left", text, level, 30);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.storeBubbles[name]["left"]
el: this.fixedStoreBubbles[name]["left"]
}]
});
this.set(name, this.storeBubbles[name]["left"]);
this.set(name, this.fixedStoreBubbles[name]["left"]);
var position = this._getLeftPosition(name, context, offsetStyle);
this.get(name).element.css({
left: position.left - adjustXOffset,
@ -15721,21 +15737,26 @@ BI.BubblesController = BI.inherit(BI.Controller, {
},
get: function (name) {
return this.bubblesManager[name];
return this.fixedBubblesManager[name] || this.bubblesManager[name];
},
set: function (name, bubble) {
this.bubblesManager[name] = bubble;
set: function (name, bubble, fixed) {
fixed === false ? (this.bubblesManager[name] = bubble) : (this.fixedBubblesManager[name] = bubble);
},
has: function (name) {
return this.bubblesManager[name] != null;
return this.fixedBubblesManager[name] != null || this.bubblesManager[name] != null;
},
remove: function (name) {
if (!this.has(name)) {
return this;
}
BI.each(this.fixedStoreBubbles[name], function (dir, bubble) {
bubble.destroy();
});
delete this.fixedStoreBubbles[name];
delete this.fixedBubblesManager[name];
BI.each(this.storeBubbles[name], function (dir, bubble) {
bubble.destroy();
});
@ -31353,21 +31374,6 @@ BI.Label = BI.inherit(BI.AbstractLabel, {
keyword: ""
},
_createJson: function () {
var o = this.options;
return {
type: "bi.text",
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
lineHeight: o.textHeight,
text: o.text,
value: o.value,
py: o.py,
keyword: o.keyword,
highLight: o.highLight
};
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -31379,6 +31385,7 @@ BI.Label = BI.inherit(BI.AbstractLabel, {
BI.shortcut("bi.label", BI.Label);
/***/ }),
/* 432 */
/***/ (function(module, exports) {
@ -46991,9 +46998,9 @@ BI.AccurateCalculationModel = BI.inherit(BI.Widget, {
/**
* Created by roy on 15/8/14.
*/
BI.DownListCombo = BI.inherit(BI.Widget, {
BI.MultiLayerDownListCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this, arguments), {
return BI.extend(BI.MultiLayerDownListCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-down-list-combo",
height: 24,
items: [],
@ -47007,7 +47014,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
},
_init: function () {
BI.DownListCombo.superclass._init.apply(this, arguments);
BI.MultiLayerDownListCombo.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.popupview = BI.createWidget({
type: "bi.multi_layer_down_list_popup",
@ -47016,13 +47023,13 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
value: o.value
});
this.popupview.on(BI.DownListPopup.EVENT_CHANGE, function (value) {
self.fireEvent(BI.DownListCombo.EVENT_CHANGE, value);
this.popupview.on(BI.MultiLayerDownListPopup.EVENT_CHANGE, function (value) {
self.fireEvent(BI.MultiLayerDownListCombo.EVENT_CHANGE, value);
self.downlistcombo.hideView();
});
this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE, function (value, fatherValue) {
self.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue);
this.popupview.on(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE, function (value, fatherValue) {
self.fireEvent(BI.MultiLayerDownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue);
self.downlistcombo.hideView();
});
@ -47050,7 +47057,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
});
this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
self.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW);
self.fireEvent(BI.MultiLayerDownListCombo.EVENT_BEFORE_POPUPVIEW);
});
},
@ -47073,11 +47080,11 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
return this.popupview.getValue();
}
});
BI.DownListCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DownListCombo.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE";
BI.DownListCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.MultiLayerDownListCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultiLayerDownListCombo.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE";
BI.MultiLayerDownListCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.multi_layer_down_list_combo", BI.DownListCombo);
BI.shortcut("bi.multi_layer_down_list_combo", BI.MultiLayerDownListCombo);
/***/ }),
/* 553 */

2
dist/2.0/fineui.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui_without_normalize.css vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui_without_normalize.min.css vendored

File diff suppressed because one or more lines are too long

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/bundle.min.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/demo.css vendored

File diff suppressed because one or more lines are too long

113
dist/demo.js vendored

@ -1,4 +1,4 @@
/*! time: 2020-9-8 18:00:18 */
/*! time: 2020-9-14 13:02:03 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -9348,21 +9348,22 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
},
traversal: function (array, callback) {
traversal: function (array, callback, pNode) {
if (BI.isNull(array)) {
return;
}
var self = this;
BI.some(array, function (i, item) {
if (callback(i, item) === false) {
if (callback(i, item, pNode) === false) {
return true;
}
self.traversal(item.children, callback);
self.traversal(item.children, callback, item);
});
}
});
})();
/***/ }),
/* 121 */
/***/ (function(module, exports) {
@ -15479,14 +15480,16 @@ BI.BubblesController = BI.inherit(BI.Controller, {
_init: function () {
BI.BubblesController.superclass._init.apply(this, arguments);
var self = this;
this.fixedBubblesManager = {};
this.fixedStoreBubbles = {};
this.bubblesManager = {};
this.storeBubbles = {};
BI.Resizers.add("bubbleController" + BI.uniqueId(), function () {
BI.each(self.bubblesManager, function (name) {
BI.each(self.fixedBubblesManager, function (name) {
self.remove(name);
});
self.bubblesManager = {};
self.storeBubbles = {};
self.fixedBubblesManager = {};
self.fixedStoreBubbles = {};
});
},
@ -15577,6 +15580,8 @@ BI.BubblesController = BI.inherit(BI.Controller, {
var adjustYOffset = opt.adjustYOffset || 0;
var adjustXOffset = opt.adjustXOffset || 0;
var fixed = opt.fixed !== false;
// 如果是非固定位置(fixed)的bubble
if (fixed === false) {
if (!this.storeBubbles[name]) {
this.storeBubbles[name] = {};
}
@ -15591,9 +15596,6 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}]
});
this.set(name, this.storeBubbles[name]["top"]);
// 如果是非固定位置(fixed)的bubble
if (fixed === false) {
var bubble = this.storeBubbles[name]["top"];
var bounds = bubble.element.bounds();
if (BI.DOM.isTopSpaceEnough(context, this.get(name), adjustYOffset)) {
@ -15642,36 +15644,50 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}
}
} else {
if (!this.fixedStoreBubbles[name]) {
this.fixedStoreBubbles[name] = {};
}
if (!this.fixedStoreBubbles[name]["top"]) {
this.fixedStoreBubbles[name]["top"] = this._createBubble("top", text, level, null, fixed);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.fixedStoreBubbles[name]["top"]
}]
});
this.set(name, this.fixedStoreBubbles[name]["top"]);
var position = this._getTopPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left + adjustXOffset, top: position.top - adjustYOffset});
if (!BI.DOM.isTopSpaceEnough(context, this.get(name), adjustYOffset)) {
this.get(name).invisible();
if (!this.storeBubbles[name]["bottom"]) {
this.storeBubbles[name]["bottom"] = this._createBubble("bottom", text, level);
if (!this.fixedStoreBubbles[name]["bottom"]) {
this.fixedStoreBubbles[name]["bottom"] = this._createBubble("bottom", text, level);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.storeBubbles[name]["bottom"]
el: this.fixedStoreBubbles[name]["bottom"]
}]
});
this.set(name, this.storeBubbles[name]["bottom"]);
this.set(name, this.fixedStoreBubbles[name]["bottom"]);
var position = this._getBottomPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left + adjustXOffset, top: position.top + adjustYOffset});
if (!BI.DOM.isBottomSpaceEnough(context, this.get(name), adjustYOffset)) {
this.get(name).invisible();
if (!this.storeBubbles[name]["right"]) {
this.storeBubbles[name]["right"] = this._createBubble("right", text, level);
if (!this.fixedStoreBubbles[name]["right"]) {
this.fixedStoreBubbles[name]["right"] = this._createBubble("right", text, level);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.storeBubbles[name]["right"]
el: this.fixedStoreBubbles[name]["right"]
}]
});
this.set(name, this.storeBubbles[name]["right"]);
this.set(name, this.fixedStoreBubbles[name]["right"]);
var position = this._getRightPosition(name, context, offsetStyle);
this.get(name).element.css({
left: position.left + adjustXOffset,
@ -15679,17 +15695,17 @@ BI.BubblesController = BI.inherit(BI.Controller, {
});
if (!BI.DOM.isRightSpaceEnough(context, this.get(name), adjustXOffset)) {
this.get(name).invisible();
if (!this.storeBubbles[name]["left"]) {
this.storeBubbles[name]["left"] = this._createBubble("left", text, level, 30);
if (!this.fixedStoreBubbles[name]["left"]) {
this.fixedStoreBubbles[name]["left"] = this._createBubble("left", text, level, 30);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.storeBubbles[name]["left"]
el: this.fixedStoreBubbles[name]["left"]
}]
});
this.set(name, this.storeBubbles[name]["left"]);
this.set(name, this.fixedStoreBubbles[name]["left"]);
var position = this._getLeftPosition(name, context, offsetStyle);
this.get(name).element.css({
left: position.left - adjustXOffset,
@ -15721,21 +15737,26 @@ BI.BubblesController = BI.inherit(BI.Controller, {
},
get: function (name) {
return this.bubblesManager[name];
return this.fixedBubblesManager[name] || this.bubblesManager[name];
},
set: function (name, bubble) {
this.bubblesManager[name] = bubble;
set: function (name, bubble, fixed) {
fixed === false ? (this.bubblesManager[name] = bubble) : (this.fixedBubblesManager[name] = bubble);
},
has: function (name) {
return this.bubblesManager[name] != null;
return this.fixedBubblesManager[name] != null || this.bubblesManager[name] != null;
},
remove: function (name) {
if (!this.has(name)) {
return this;
}
BI.each(this.fixedStoreBubbles[name], function (dir, bubble) {
bubble.destroy();
});
delete this.fixedStoreBubbles[name];
delete this.fixedBubblesManager[name];
BI.each(this.storeBubbles[name], function (dir, bubble) {
bubble.destroy();
});
@ -31353,21 +31374,6 @@ BI.Label = BI.inherit(BI.AbstractLabel, {
keyword: ""
},
_createJson: function () {
var o = this.options;
return {
type: "bi.text",
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
lineHeight: o.textHeight,
text: o.text,
value: o.value,
py: o.py,
keyword: o.keyword,
highLight: o.highLight
};
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -31379,6 +31385,7 @@ BI.Label = BI.inherit(BI.AbstractLabel, {
BI.shortcut("bi.label", BI.Label);
/***/ }),
/* 432 */
/***/ (function(module, exports) {
@ -46991,9 +46998,9 @@ BI.AccurateCalculationModel = BI.inherit(BI.Widget, {
/**
* Created by roy on 15/8/14.
*/
BI.DownListCombo = BI.inherit(BI.Widget, {
BI.MultiLayerDownListCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this, arguments), {
return BI.extend(BI.MultiLayerDownListCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-down-list-combo",
height: 24,
items: [],
@ -47007,7 +47014,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
},
_init: function () {
BI.DownListCombo.superclass._init.apply(this, arguments);
BI.MultiLayerDownListCombo.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.popupview = BI.createWidget({
type: "bi.multi_layer_down_list_popup",
@ -47016,13 +47023,13 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
value: o.value
});
this.popupview.on(BI.DownListPopup.EVENT_CHANGE, function (value) {
self.fireEvent(BI.DownListCombo.EVENT_CHANGE, value);
this.popupview.on(BI.MultiLayerDownListPopup.EVENT_CHANGE, function (value) {
self.fireEvent(BI.MultiLayerDownListCombo.EVENT_CHANGE, value);
self.downlistcombo.hideView();
});
this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE, function (value, fatherValue) {
self.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue);
this.popupview.on(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE, function (value, fatherValue) {
self.fireEvent(BI.MultiLayerDownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue);
self.downlistcombo.hideView();
});
@ -47050,7 +47057,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
});
this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
self.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW);
self.fireEvent(BI.MultiLayerDownListCombo.EVENT_BEFORE_POPUPVIEW);
});
},
@ -47073,11 +47080,11 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
return this.popupview.getValue();
}
});
BI.DownListCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DownListCombo.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE";
BI.DownListCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.MultiLayerDownListCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultiLayerDownListCombo.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE";
BI.MultiLayerDownListCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.multi_layer_down_list_combo", BI.DownListCombo);
BI.shortcut("bi.multi_layer_down_list_combo", BI.MultiLayerDownListCombo);
/***/ }),
/* 553 */

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

113
dist/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2020-9-8 18:00:18 */
/*! time: 2020-9-14 13:02:03 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -9348,21 +9348,22 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
},
traversal: function (array, callback) {
traversal: function (array, callback, pNode) {
if (BI.isNull(array)) {
return;
}
var self = this;
BI.some(array, function (i, item) {
if (callback(i, item) === false) {
if (callback(i, item, pNode) === false) {
return true;
}
self.traversal(item.children, callback);
self.traversal(item.children, callback, item);
});
}
});
})();
/***/ }),
/* 121 */
/***/ (function(module, exports) {
@ -15479,14 +15480,16 @@ BI.BubblesController = BI.inherit(BI.Controller, {
_init: function () {
BI.BubblesController.superclass._init.apply(this, arguments);
var self = this;
this.fixedBubblesManager = {};
this.fixedStoreBubbles = {};
this.bubblesManager = {};
this.storeBubbles = {};
BI.Resizers.add("bubbleController" + BI.uniqueId(), function () {
BI.each(self.bubblesManager, function (name) {
BI.each(self.fixedBubblesManager, function (name) {
self.remove(name);
});
self.bubblesManager = {};
self.storeBubbles = {};
self.fixedBubblesManager = {};
self.fixedStoreBubbles = {};
});
},
@ -15577,6 +15580,8 @@ BI.BubblesController = BI.inherit(BI.Controller, {
var adjustYOffset = opt.adjustYOffset || 0;
var adjustXOffset = opt.adjustXOffset || 0;
var fixed = opt.fixed !== false;
// 如果是非固定位置(fixed)的bubble
if (fixed === false) {
if (!this.storeBubbles[name]) {
this.storeBubbles[name] = {};
}
@ -15591,9 +15596,6 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}]
});
this.set(name, this.storeBubbles[name]["top"]);
// 如果是非固定位置(fixed)的bubble
if (fixed === false) {
var bubble = this.storeBubbles[name]["top"];
var bounds = bubble.element.bounds();
if (BI.DOM.isTopSpaceEnough(context, this.get(name), adjustYOffset)) {
@ -15642,36 +15644,50 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}
}
} else {
if (!this.fixedStoreBubbles[name]) {
this.fixedStoreBubbles[name] = {};
}
if (!this.fixedStoreBubbles[name]["top"]) {
this.fixedStoreBubbles[name]["top"] = this._createBubble("top", text, level, null, fixed);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.fixedStoreBubbles[name]["top"]
}]
});
this.set(name, this.fixedStoreBubbles[name]["top"]);
var position = this._getTopPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left + adjustXOffset, top: position.top - adjustYOffset});
if (!BI.DOM.isTopSpaceEnough(context, this.get(name), adjustYOffset)) {
this.get(name).invisible();
if (!this.storeBubbles[name]["bottom"]) {
this.storeBubbles[name]["bottom"] = this._createBubble("bottom", text, level);
if (!this.fixedStoreBubbles[name]["bottom"]) {
this.fixedStoreBubbles[name]["bottom"] = this._createBubble("bottom", text, level);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.storeBubbles[name]["bottom"]
el: this.fixedStoreBubbles[name]["bottom"]
}]
});
this.set(name, this.storeBubbles[name]["bottom"]);
this.set(name, this.fixedStoreBubbles[name]["bottom"]);
var position = this._getBottomPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left + adjustXOffset, top: position.top + adjustYOffset});
if (!BI.DOM.isBottomSpaceEnough(context, this.get(name), adjustYOffset)) {
this.get(name).invisible();
if (!this.storeBubbles[name]["right"]) {
this.storeBubbles[name]["right"] = this._createBubble("right", text, level);
if (!this.fixedStoreBubbles[name]["right"]) {
this.fixedStoreBubbles[name]["right"] = this._createBubble("right", text, level);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.storeBubbles[name]["right"]
el: this.fixedStoreBubbles[name]["right"]
}]
});
this.set(name, this.storeBubbles[name]["right"]);
this.set(name, this.fixedStoreBubbles[name]["right"]);
var position = this._getRightPosition(name, context, offsetStyle);
this.get(name).element.css({
left: position.left + adjustXOffset,
@ -15679,17 +15695,17 @@ BI.BubblesController = BI.inherit(BI.Controller, {
});
if (!BI.DOM.isRightSpaceEnough(context, this.get(name), adjustXOffset)) {
this.get(name).invisible();
if (!this.storeBubbles[name]["left"]) {
this.storeBubbles[name]["left"] = this._createBubble("left", text, level, 30);
if (!this.fixedStoreBubbles[name]["left"]) {
this.fixedStoreBubbles[name]["left"] = this._createBubble("left", text, level, 30);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.storeBubbles[name]["left"]
el: this.fixedStoreBubbles[name]["left"]
}]
});
this.set(name, this.storeBubbles[name]["left"]);
this.set(name, this.fixedStoreBubbles[name]["left"]);
var position = this._getLeftPosition(name, context, offsetStyle);
this.get(name).element.css({
left: position.left - adjustXOffset,
@ -15721,21 +15737,26 @@ BI.BubblesController = BI.inherit(BI.Controller, {
},
get: function (name) {
return this.bubblesManager[name];
return this.fixedBubblesManager[name] || this.bubblesManager[name];
},
set: function (name, bubble) {
this.bubblesManager[name] = bubble;
set: function (name, bubble, fixed) {
fixed === false ? (this.bubblesManager[name] = bubble) : (this.fixedBubblesManager[name] = bubble);
},
has: function (name) {
return this.bubblesManager[name] != null;
return this.fixedBubblesManager[name] != null || this.bubblesManager[name] != null;
},
remove: function (name) {
if (!this.has(name)) {
return this;
}
BI.each(this.fixedStoreBubbles[name], function (dir, bubble) {
bubble.destroy();
});
delete this.fixedStoreBubbles[name];
delete this.fixedBubblesManager[name];
BI.each(this.storeBubbles[name], function (dir, bubble) {
bubble.destroy();
});
@ -31353,21 +31374,6 @@ BI.Label = BI.inherit(BI.AbstractLabel, {
keyword: ""
},
_createJson: function () {
var o = this.options;
return {
type: "bi.text",
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
lineHeight: o.textHeight,
text: o.text,
value: o.value,
py: o.py,
keyword: o.keyword,
highLight: o.highLight
};
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -31379,6 +31385,7 @@ BI.Label = BI.inherit(BI.AbstractLabel, {
BI.shortcut("bi.label", BI.Label);
/***/ }),
/* 432 */
/***/ (function(module, exports) {
@ -46991,9 +46998,9 @@ BI.AccurateCalculationModel = BI.inherit(BI.Widget, {
/**
* Created by roy on 15/8/14.
*/
BI.DownListCombo = BI.inherit(BI.Widget, {
BI.MultiLayerDownListCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this, arguments), {
return BI.extend(BI.MultiLayerDownListCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-down-list-combo",
height: 24,
items: [],
@ -47007,7 +47014,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
},
_init: function () {
BI.DownListCombo.superclass._init.apply(this, arguments);
BI.MultiLayerDownListCombo.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.popupview = BI.createWidget({
type: "bi.multi_layer_down_list_popup",
@ -47016,13 +47023,13 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
value: o.value
});
this.popupview.on(BI.DownListPopup.EVENT_CHANGE, function (value) {
self.fireEvent(BI.DownListCombo.EVENT_CHANGE, value);
this.popupview.on(BI.MultiLayerDownListPopup.EVENT_CHANGE, function (value) {
self.fireEvent(BI.MultiLayerDownListCombo.EVENT_CHANGE, value);
self.downlistcombo.hideView();
});
this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE, function (value, fatherValue) {
self.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue);
this.popupview.on(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE, function (value, fatherValue) {
self.fireEvent(BI.MultiLayerDownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue);
self.downlistcombo.hideView();
});
@ -47050,7 +47057,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
});
this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
self.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW);
self.fireEvent(BI.MultiLayerDownListCombo.EVENT_BEFORE_POPUPVIEW);
});
},
@ -47073,11 +47080,11 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
return this.popupview.getValue();
}
});
BI.DownListCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DownListCombo.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE";
BI.DownListCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.MultiLayerDownListCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultiLayerDownListCombo.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE";
BI.MultiLayerDownListCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.multi_layer_down_list_combo", BI.DownListCombo);
BI.shortcut("bi.multi_layer_down_list_combo", BI.MultiLayerDownListCombo);
/***/ }),
/* 553 */

2
dist/fineui.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

113
dist/fineui_without_jquery_polyfill.js vendored

@ -1,4 +1,4 @@
/*! time: 2020-9-8 18:00:18 */
/*! time: 2020-9-14 13:02:03 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -6809,21 +6809,22 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
},
traversal: function (array, callback) {
traversal: function (array, callback, pNode) {
if (BI.isNull(array)) {
return;
}
var self = this;
BI.some(array, function (i, item) {
if (callback(i, item) === false) {
if (callback(i, item, pNode) === false) {
return true;
}
self.traversal(item.children, callback);
self.traversal(item.children, callback, item);
});
}
});
})();
/***/ }),
/* 121 */
/***/ (function(module, exports) {
@ -11506,14 +11507,16 @@ BI.BubblesController = BI.inherit(BI.Controller, {
_init: function () {
BI.BubblesController.superclass._init.apply(this, arguments);
var self = this;
this.fixedBubblesManager = {};
this.fixedStoreBubbles = {};
this.bubblesManager = {};
this.storeBubbles = {};
BI.Resizers.add("bubbleController" + BI.uniqueId(), function () {
BI.each(self.bubblesManager, function (name) {
BI.each(self.fixedBubblesManager, function (name) {
self.remove(name);
});
self.bubblesManager = {};
self.storeBubbles = {};
self.fixedBubblesManager = {};
self.fixedStoreBubbles = {};
});
},
@ -11604,6 +11607,8 @@ BI.BubblesController = BI.inherit(BI.Controller, {
var adjustYOffset = opt.adjustYOffset || 0;
var adjustXOffset = opt.adjustXOffset || 0;
var fixed = opt.fixed !== false;
// 如果是非固定位置(fixed)的bubble
if (fixed === false) {
if (!this.storeBubbles[name]) {
this.storeBubbles[name] = {};
}
@ -11618,9 +11623,6 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}]
});
this.set(name, this.storeBubbles[name]["top"]);
// 如果是非固定位置(fixed)的bubble
if (fixed === false) {
var bubble = this.storeBubbles[name]["top"];
var bounds = bubble.element.bounds();
if (BI.DOM.isTopSpaceEnough(context, this.get(name), adjustYOffset)) {
@ -11669,36 +11671,50 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}
}
} else {
if (!this.fixedStoreBubbles[name]) {
this.fixedStoreBubbles[name] = {};
}
if (!this.fixedStoreBubbles[name]["top"]) {
this.fixedStoreBubbles[name]["top"] = this._createBubble("top", text, level, null, fixed);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.fixedStoreBubbles[name]["top"]
}]
});
this.set(name, this.fixedStoreBubbles[name]["top"]);
var position = this._getTopPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left + adjustXOffset, top: position.top - adjustYOffset});
if (!BI.DOM.isTopSpaceEnough(context, this.get(name), adjustYOffset)) {
this.get(name).invisible();
if (!this.storeBubbles[name]["bottom"]) {
this.storeBubbles[name]["bottom"] = this._createBubble("bottom", text, level);
if (!this.fixedStoreBubbles[name]["bottom"]) {
this.fixedStoreBubbles[name]["bottom"] = this._createBubble("bottom", text, level);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.storeBubbles[name]["bottom"]
el: this.fixedStoreBubbles[name]["bottom"]
}]
});
this.set(name, this.storeBubbles[name]["bottom"]);
this.set(name, this.fixedStoreBubbles[name]["bottom"]);
var position = this._getBottomPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left + adjustXOffset, top: position.top + adjustYOffset});
if (!BI.DOM.isBottomSpaceEnough(context, this.get(name), adjustYOffset)) {
this.get(name).invisible();
if (!this.storeBubbles[name]["right"]) {
this.storeBubbles[name]["right"] = this._createBubble("right", text, level);
if (!this.fixedStoreBubbles[name]["right"]) {
this.fixedStoreBubbles[name]["right"] = this._createBubble("right", text, level);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.storeBubbles[name]["right"]
el: this.fixedStoreBubbles[name]["right"]
}]
});
this.set(name, this.storeBubbles[name]["right"]);
this.set(name, this.fixedStoreBubbles[name]["right"]);
var position = this._getRightPosition(name, context, offsetStyle);
this.get(name).element.css({
left: position.left + adjustXOffset,
@ -11706,17 +11722,17 @@ BI.BubblesController = BI.inherit(BI.Controller, {
});
if (!BI.DOM.isRightSpaceEnough(context, this.get(name), adjustXOffset)) {
this.get(name).invisible();
if (!this.storeBubbles[name]["left"]) {
this.storeBubbles[name]["left"] = this._createBubble("left", text, level, 30);
if (!this.fixedStoreBubbles[name]["left"]) {
this.fixedStoreBubbles[name]["left"] = this._createBubble("left", text, level, 30);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.storeBubbles[name]["left"]
el: this.fixedStoreBubbles[name]["left"]
}]
});
this.set(name, this.storeBubbles[name]["left"]);
this.set(name, this.fixedStoreBubbles[name]["left"]);
var position = this._getLeftPosition(name, context, offsetStyle);
this.get(name).element.css({
left: position.left - adjustXOffset,
@ -11748,21 +11764,26 @@ BI.BubblesController = BI.inherit(BI.Controller, {
},
get: function (name) {
return this.bubblesManager[name];
return this.fixedBubblesManager[name] || this.bubblesManager[name];
},
set: function (name, bubble) {
this.bubblesManager[name] = bubble;
set: function (name, bubble, fixed) {
fixed === false ? (this.bubblesManager[name] = bubble) : (this.fixedBubblesManager[name] = bubble);
},
has: function (name) {
return this.bubblesManager[name] != null;
return this.fixedBubblesManager[name] != null || this.bubblesManager[name] != null;
},
remove: function (name) {
if (!this.has(name)) {
return this;
}
BI.each(this.fixedStoreBubbles[name], function (dir, bubble) {
bubble.destroy();
});
delete this.fixedStoreBubbles[name];
delete this.fixedBubblesManager[name];
BI.each(this.storeBubbles[name], function (dir, bubble) {
bubble.destroy();
});
@ -27380,21 +27401,6 @@ BI.Label = BI.inherit(BI.AbstractLabel, {
keyword: ""
},
_createJson: function () {
var o = this.options;
return {
type: "bi.text",
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
lineHeight: o.textHeight,
text: o.text,
value: o.value,
py: o.py,
keyword: o.keyword,
highLight: o.highLight
};
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -27406,6 +27412,7 @@ BI.Label = BI.inherit(BI.AbstractLabel, {
BI.shortcut("bi.label", BI.Label);
/***/ }),
/* 432 */
/***/ (function(module, exports) {
@ -43018,9 +43025,9 @@ BI.AccurateCalculationModel = BI.inherit(BI.Widget, {
/**
* Created by roy on 15/8/14.
*/
BI.DownListCombo = BI.inherit(BI.Widget, {
BI.MultiLayerDownListCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this, arguments), {
return BI.extend(BI.MultiLayerDownListCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-down-list-combo",
height: 24,
items: [],
@ -43034,7 +43041,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
},
_init: function () {
BI.DownListCombo.superclass._init.apply(this, arguments);
BI.MultiLayerDownListCombo.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.popupview = BI.createWidget({
type: "bi.multi_layer_down_list_popup",
@ -43043,13 +43050,13 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
value: o.value
});
this.popupview.on(BI.DownListPopup.EVENT_CHANGE, function (value) {
self.fireEvent(BI.DownListCombo.EVENT_CHANGE, value);
this.popupview.on(BI.MultiLayerDownListPopup.EVENT_CHANGE, function (value) {
self.fireEvent(BI.MultiLayerDownListCombo.EVENT_CHANGE, value);
self.downlistcombo.hideView();
});
this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE, function (value, fatherValue) {
self.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue);
this.popupview.on(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE, function (value, fatherValue) {
self.fireEvent(BI.MultiLayerDownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue);
self.downlistcombo.hideView();
});
@ -43077,7 +43084,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
});
this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
self.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW);
self.fireEvent(BI.MultiLayerDownListCombo.EVENT_BEFORE_POPUPVIEW);
});
},
@ -43100,11 +43107,11 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
return this.popupview.getValue();
}
});
BI.DownListCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DownListCombo.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE";
BI.DownListCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.MultiLayerDownListCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultiLayerDownListCombo.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE";
BI.MultiLayerDownListCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.multi_layer_down_list_combo", BI.DownListCombo);
BI.shortcut("bi.multi_layer_down_list_combo", BI.MultiLayerDownListCombo);
/***/ }),
/* 553 */

2
dist/fineui_without_jquery_polyfill.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/font.css vendored

File diff suppressed because one or more lines are too long

9
dist/utils.js vendored

@ -1,4 +1,4 @@
/*! time: 2020-9-8 18:00:18 */
/*! time: 2020-9-14 13:02:03 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -6533,21 +6533,22 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
},
traversal: function (array, callback) {
traversal: function (array, callback, pNode) {
if (BI.isNull(array)) {
return;
}
var self = this;
BI.some(array, function (i, item) {
if (callback(i, item) === false) {
if (callback(i, item, pNode) === false) {
return true;
}
self.traversal(item.children, callback);
self.traversal(item.children, callback, item);
});
}
});
})();
/***/ }),
/***/ 121:

2
dist/utils.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/utils.min.js.map vendored

File diff suppressed because one or more lines are too long

2
package.json

@ -1,6 +1,6 @@
{
"name": "fineui",
"version": "2.0.20200908180244",
"version": "2.0.20200914130402",
"description": "fineui",
"main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts",

15
src/base/single/label/label.js

@ -10,21 +10,6 @@ BI.Label = BI.inherit(BI.AbstractLabel, {
keyword: ""
},
_createJson: function () {
var o = this.options;
return {
type: "bi.text",
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
lineHeight: o.textHeight,
text: o.text,
value: o.value,
py: o.py,
keyword: o.keyword,
highLight: o.highLight
};
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},

64
src/core/controller/controller.bubbles.js

@ -17,14 +17,16 @@ BI.BubblesController = BI.inherit(BI.Controller, {
_init: function () {
BI.BubblesController.superclass._init.apply(this, arguments);
var self = this;
this.fixedBubblesManager = {};
this.fixedStoreBubbles = {};
this.bubblesManager = {};
this.storeBubbles = {};
BI.Resizers.add("bubbleController" + BI.uniqueId(), function () {
BI.each(self.bubblesManager, function (name) {
BI.each(self.fixedBubblesManager, function (name) {
self.remove(name);
});
self.bubblesManager = {};
self.storeBubbles = {};
self.fixedBubblesManager = {};
self.fixedStoreBubbles = {};
});
},
@ -115,6 +117,8 @@ BI.BubblesController = BI.inherit(BI.Controller, {
var adjustYOffset = opt.adjustYOffset || 0;
var adjustXOffset = opt.adjustXOffset || 0;
var fixed = opt.fixed !== false;
// 如果是非固定位置(fixed)的bubble
if (fixed === false) {
if (!this.storeBubbles[name]) {
this.storeBubbles[name] = {};
}
@ -129,9 +133,6 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}]
});
this.set(name, this.storeBubbles[name]["top"]);
// 如果是非固定位置(fixed)的bubble
if (fixed === false) {
var bubble = this.storeBubbles[name]["top"];
var bounds = bubble.element.bounds();
if (BI.DOM.isTopSpaceEnough(context, this.get(name), adjustYOffset)) {
@ -180,36 +181,50 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}
}
} else {
if (!this.fixedStoreBubbles[name]) {
this.fixedStoreBubbles[name] = {};
}
if (!this.fixedStoreBubbles[name]["top"]) {
this.fixedStoreBubbles[name]["top"] = this._createBubble("top", text, level, null, fixed);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.fixedStoreBubbles[name]["top"]
}]
});
this.set(name, this.fixedStoreBubbles[name]["top"]);
var position = this._getTopPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left + adjustXOffset, top: position.top - adjustYOffset});
if (!BI.DOM.isTopSpaceEnough(context, this.get(name), adjustYOffset)) {
this.get(name).invisible();
if (!this.storeBubbles[name]["bottom"]) {
this.storeBubbles[name]["bottom"] = this._createBubble("bottom", text, level);
if (!this.fixedStoreBubbles[name]["bottom"]) {
this.fixedStoreBubbles[name]["bottom"] = this._createBubble("bottom", text, level);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.storeBubbles[name]["bottom"]
el: this.fixedStoreBubbles[name]["bottom"]
}]
});
this.set(name, this.storeBubbles[name]["bottom"]);
this.set(name, this.fixedStoreBubbles[name]["bottom"]);
var position = this._getBottomPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left + adjustXOffset, top: position.top + adjustYOffset});
if (!BI.DOM.isBottomSpaceEnough(context, this.get(name), adjustYOffset)) {
this.get(name).invisible();
if (!this.storeBubbles[name]["right"]) {
this.storeBubbles[name]["right"] = this._createBubble("right", text, level);
if (!this.fixedStoreBubbles[name]["right"]) {
this.fixedStoreBubbles[name]["right"] = this._createBubble("right", text, level);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.storeBubbles[name]["right"]
el: this.fixedStoreBubbles[name]["right"]
}]
});
this.set(name, this.storeBubbles[name]["right"]);
this.set(name, this.fixedStoreBubbles[name]["right"]);
var position = this._getRightPosition(name, context, offsetStyle);
this.get(name).element.css({
left: position.left + adjustXOffset,
@ -217,17 +232,17 @@ BI.BubblesController = BI.inherit(BI.Controller, {
});
if (!BI.DOM.isRightSpaceEnough(context, this.get(name), adjustXOffset)) {
this.get(name).invisible();
if (!this.storeBubbles[name]["left"]) {
this.storeBubbles[name]["left"] = this._createBubble("left", text, level, 30);
if (!this.fixedStoreBubbles[name]["left"]) {
this.fixedStoreBubbles[name]["left"] = this._createBubble("left", text, level, 30);
}
BI.createWidget({
type: "bi.absolute",
element: container,
items: [{
el: this.storeBubbles[name]["left"]
el: this.fixedStoreBubbles[name]["left"]
}]
});
this.set(name, this.storeBubbles[name]["left"]);
this.set(name, this.fixedStoreBubbles[name]["left"]);
var position = this._getLeftPosition(name, context, offsetStyle);
this.get(name).element.css({
left: position.left - adjustXOffset,
@ -259,21 +274,26 @@ BI.BubblesController = BI.inherit(BI.Controller, {
},
get: function (name) {
return this.bubblesManager[name];
return this.fixedBubblesManager[name] || this.bubblesManager[name];
},
set: function (name, bubble) {
this.bubblesManager[name] = bubble;
set: function (name, bubble, fixed) {
fixed === false ? (this.bubblesManager[name] = bubble) : (this.fixedBubblesManager[name] = bubble);
},
has: function (name) {
return this.bubblesManager[name] != null;
return this.fixedBubblesManager[name] != null || this.bubblesManager[name] != null;
},
remove: function (name) {
if (!this.has(name)) {
return this;
}
BI.each(this.fixedStoreBubbles[name], function (dir, bubble) {
bubble.destroy();
});
delete this.fixedStoreBubbles[name];
delete this.fixedBubblesManager[name];
BI.each(this.storeBubbles[name], function (dir, bubble) {
bubble.destroy();
});

6
src/core/utils/tree.js

@ -500,16 +500,16 @@
},
traversal: function (array, callback) {
traversal: function (array, callback, pNode) {
if (BI.isNull(array)) {
return;
}
var self = this;
BI.some(array, function (i, item) {
if (callback(i, item) === false) {
if (callback(i, item, pNode) === false) {
return true;
}
self.traversal(item.children, callback);
self.traversal(item.children, callback, item);
});
}
});

24
src/widget/multilayerdownlist/combo.downlist.js

@ -1,9 +1,9 @@
/**
* Created by roy on 15/8/14.
*/
BI.DownListCombo = BI.inherit(BI.Widget, {
BI.MultiLayerDownListCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this, arguments), {
return BI.extend(BI.MultiLayerDownListCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-down-list-combo",
height: 24,
items: [],
@ -17,7 +17,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
},
_init: function () {
BI.DownListCombo.superclass._init.apply(this, arguments);
BI.MultiLayerDownListCombo.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.popupview = BI.createWidget({
type: "bi.multi_layer_down_list_popup",
@ -26,13 +26,13 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
value: o.value
});
this.popupview.on(BI.DownListPopup.EVENT_CHANGE, function (value) {
self.fireEvent(BI.DownListCombo.EVENT_CHANGE, value);
this.popupview.on(BI.MultiLayerDownListPopup.EVENT_CHANGE, function (value) {
self.fireEvent(BI.MultiLayerDownListCombo.EVENT_CHANGE, value);
self.downlistcombo.hideView();
});
this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE, function (value, fatherValue) {
self.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue);
this.popupview.on(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE, function (value, fatherValue) {
self.fireEvent(BI.MultiLayerDownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue);
self.downlistcombo.hideView();
});
@ -60,7 +60,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
});
this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
self.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW);
self.fireEvent(BI.MultiLayerDownListCombo.EVENT_BEFORE_POPUPVIEW);
});
},
@ -83,8 +83,8 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
return this.popupview.getValue();
}
});
BI.DownListCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DownListCombo.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE";
BI.DownListCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.MultiLayerDownListCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultiLayerDownListCombo.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE";
BI.MultiLayerDownListCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.multi_layer_down_list_combo", BI.DownListCombo);
BI.shortcut("bi.multi_layer_down_list_combo", BI.MultiLayerDownListCombo);
Loading…
Cancel
Save