|
|
@ -179,61 +179,66 @@ BI.BubblesController = BI.inherit(BI.Controller, { |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return this; |
|
|
|
} else { |
|
|
|
} |
|
|
|
var position = this._getTopPosition(name, context, offsetStyle); |
|
|
|
var position = this._getTopPosition(name, context, offsetStyle); |
|
|
|
this.get(name).element.css({left: position.left + adjustXOffset, top: position.top - adjustYOffset}); |
|
|
|
this.get(name).element.css({left: position.left + adjustXOffset, top: position.top - adjustYOffset}); |
|
|
|
if (!BI.DOM.isTopSpaceEnough(context, this.get(name), 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); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
|
|
|
type: "bi.absolute", |
|
|
|
|
|
|
|
element: container, |
|
|
|
|
|
|
|
items: [{ |
|
|
|
|
|
|
|
el: this.storeBubbles[name]["bottom"] |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.set(name, this.storeBubbles[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(); |
|
|
|
this.get(name).invisible(); |
|
|
|
if (!this.storeBubbles[name]["right"]) { |
|
|
|
if (!this.storeBubbles[name]["bottom"]) { |
|
|
|
this.storeBubbles[name]["right"] = this._createBubble("right", text, level); |
|
|
|
this.storeBubbles[name]["bottom"] = this._createBubble("bottom", text, level); |
|
|
|
} |
|
|
|
} |
|
|
|
BI.createWidget({ |
|
|
|
BI.createWidget({ |
|
|
|
type: "bi.absolute", |
|
|
|
type: "bi.absolute", |
|
|
|
element: container, |
|
|
|
element: container, |
|
|
|
items: [{ |
|
|
|
items: [{ |
|
|
|
el: this.storeBubbles[name]["right"] |
|
|
|
el: this.storeBubbles[name]["bottom"] |
|
|
|
}] |
|
|
|
}] |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.set(name, this.storeBubbles[name]["right"]); |
|
|
|
this.set(name, this.storeBubbles[name]["bottom"]); |
|
|
|
var position = this._getRightPosition(name, context, offsetStyle); |
|
|
|
var position = this._getBottomPosition(name, context, offsetStyle); |
|
|
|
this.get(name).element.css({left: position.left + adjustXOffset, top: position.top - adjustYOffset}); |
|
|
|
this.get(name).element.css({left: position.left + adjustXOffset, top: position.top + adjustYOffset}); |
|
|
|
if (!BI.DOM.isRightSpaceEnough(context, this.get(name), adjustXOffset)) { |
|
|
|
if (!BI.DOM.isBottomSpaceEnough(context, this.get(name), adjustYOffset)) { |
|
|
|
this.get(name).invisible(); |
|
|
|
this.get(name).invisible(); |
|
|
|
if (!this.storeBubbles[name]["left"]) { |
|
|
|
if (!this.storeBubbles[name]["right"]) { |
|
|
|
this.storeBubbles[name]["left"] = this._createBubble("left", text, level, 30); |
|
|
|
this.storeBubbles[name]["right"] = this._createBubble("right", text, level); |
|
|
|
} |
|
|
|
} |
|
|
|
BI.createWidget({ |
|
|
|
BI.createWidget({ |
|
|
|
type: "bi.absolute", |
|
|
|
type: "bi.absolute", |
|
|
|
element: container, |
|
|
|
element: container, |
|
|
|
items: [{ |
|
|
|
items: [{ |
|
|
|
el: this.storeBubbles[name]["left"] |
|
|
|
el: this.storeBubbles[name]["right"] |
|
|
|
}] |
|
|
|
}] |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.set(name, this.storeBubbles[name]["left"]); |
|
|
|
this.set(name, this.storeBubbles[name]["right"]); |
|
|
|
var position = this._getLeftPosition(name, context, offsetStyle); |
|
|
|
var position = this._getRightPosition(name, context, offsetStyle); |
|
|
|
this.get(name).element.css({ |
|
|
|
this.get(name).element.css({ |
|
|
|
left: position.left - adjustXOffset, |
|
|
|
left: position.left + adjustXOffset, |
|
|
|
top: position.top - adjustYOffset |
|
|
|
top: position.top - adjustYOffset |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
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); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
|
|
|
type: "bi.absolute", |
|
|
|
|
|
|
|
element: container, |
|
|
|
|
|
|
|
items: [{ |
|
|
|
|
|
|
|
el: this.storeBubbles[name]["left"] |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.set(name, this.storeBubbles[name]["left"]); |
|
|
|
|
|
|
|
var position = this._getLeftPosition(name, context, offsetStyle); |
|
|
|
|
|
|
|
this.get(name).element.css({ |
|
|
|
|
|
|
|
left: position.left - adjustXOffset, |
|
|
|
|
|
|
|
top: position.top - adjustYOffset |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.get(name).setText(text); |
|
|
|
|
|
|
|
this.get(name).visible(); |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|