guy 8 years ago
parent
commit
8f0e527980
  1. 50
      bi/core.js
  2. 50
      dist/core.js
  3. 50
      src/core/controller/controller.floatbox.js

50
bi/core.js

@ -15684,28 +15684,30 @@ BI.FloatBoxController = BI.inherit(BI.Controller, {
if (!this._check(name)) { if (!this._check(name)) {
return this; return this;
} }
var container = this.floatContainer[name]; if (!this.floatContainer[name].isVisible()) {
container.element.css("zIndex", this.zindex++); var container = this.floatContainer[name];
this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]); container.element.css("zIndex", this.zindex++);
this.zindexMap[name] = this.zindex; this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]);
this.modal && container.element.__buildZIndexMask__(this.zindex++); this.zindexMap[name] = this.zindex;
this.get(name).setZindex(this.zindex++); this.modal && container.element.__buildZIndexMask__(this.zindex++);
this.floatContainer[name].visible(); this.get(name).setZindex(this.zindex++);
var floatbox = this.get(name); this.floatContainer[name].visible();
floatbox.show(); var floatbox = this.get(name);
var W = $(this.options.render).width(), H = $(this.options.render).height(); floatbox.show();
var w = floatbox.element.width(), h = floatbox.element.height(); var W = $(this.options.render).width(), H = $(this.options.render).height();
var left = (W - w) / 2, top = (H - h) / 2; var w = floatbox.element.width(), h = floatbox.element.height();
if (left < 0) { var left = (W - w) / 2, top = (H - h) / 2;
left = 0; if (left < 0) {
} left = 0;
if (top < 0) { }
top = 0; if (top < 0) {
top = 0;
}
floatbox.element.css({
left: left + "px",
top: top + "px"
});
} }
floatbox.element.css({
left: left + "px",
top: top + "px"
});
return this; return this;
}, },
@ -15713,8 +15715,10 @@ BI.FloatBoxController = BI.inherit(BI.Controller, {
if (!this._check(name)) { if (!this._check(name)) {
return this; return this;
} }
this.floatContainer[name].invisible(); if (this.floatContainer[name].isVisible()) {
this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]); this.floatContainer[name].invisible();
this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]);
}
return this; return this;
}, },

50
dist/core.js vendored

@ -20757,28 +20757,30 @@ BI.FloatBoxController = BI.inherit(BI.Controller, {
if (!this._check(name)) { if (!this._check(name)) {
return this; return this;
} }
var container = this.floatContainer[name]; if (!this.floatContainer[name].isVisible()) {
container.element.css("zIndex", this.zindex++); var container = this.floatContainer[name];
this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]); container.element.css("zIndex", this.zindex++);
this.zindexMap[name] = this.zindex; this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]);
this.modal && container.element.__buildZIndexMask__(this.zindex++); this.zindexMap[name] = this.zindex;
this.get(name).setZindex(this.zindex++); this.modal && container.element.__buildZIndexMask__(this.zindex++);
this.floatContainer[name].visible(); this.get(name).setZindex(this.zindex++);
var floatbox = this.get(name); this.floatContainer[name].visible();
floatbox.show(); var floatbox = this.get(name);
var W = $(this.options.render).width(), H = $(this.options.render).height(); floatbox.show();
var w = floatbox.element.width(), h = floatbox.element.height(); var W = $(this.options.render).width(), H = $(this.options.render).height();
var left = (W - w) / 2, top = (H - h) / 2; var w = floatbox.element.width(), h = floatbox.element.height();
if (left < 0) { var left = (W - w) / 2, top = (H - h) / 2;
left = 0; if (left < 0) {
} left = 0;
if (top < 0) { }
top = 0; if (top < 0) {
top = 0;
}
floatbox.element.css({
left: left + "px",
top: top + "px"
});
} }
floatbox.element.css({
left: left + "px",
top: top + "px"
});
return this; return this;
}, },
@ -20786,8 +20788,10 @@ BI.FloatBoxController = BI.inherit(BI.Controller, {
if (!this._check(name)) { if (!this._check(name)) {
return this; return this;
} }
this.floatContainer[name].invisible(); if (this.floatContainer[name].isVisible()) {
this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]); this.floatContainer[name].invisible();
this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]);
}
return this; return this;
}, },

50
src/core/controller/controller.floatbox.js

@ -82,28 +82,30 @@ BI.FloatBoxController = BI.inherit(BI.Controller, {
if (!this._check(name)) { if (!this._check(name)) {
return this; return this;
} }
var container = this.floatContainer[name]; if (!this.floatContainer[name].isVisible()) {
container.element.css("zIndex", this.zindex++); var container = this.floatContainer[name];
this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]); container.element.css("zIndex", this.zindex++);
this.zindexMap[name] = this.zindex; this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]);
this.modal && container.element.__buildZIndexMask__(this.zindex++); this.zindexMap[name] = this.zindex;
this.get(name).setZindex(this.zindex++); this.modal && container.element.__buildZIndexMask__(this.zindex++);
this.floatContainer[name].visible(); this.get(name).setZindex(this.zindex++);
var floatbox = this.get(name); this.floatContainer[name].visible();
floatbox.show(); var floatbox = this.get(name);
var W = $(this.options.render).width(), H = $(this.options.render).height(); floatbox.show();
var w = floatbox.element.width(), h = floatbox.element.height(); var W = $(this.options.render).width(), H = $(this.options.render).height();
var left = (W - w) / 2, top = (H - h) / 2; var w = floatbox.element.width(), h = floatbox.element.height();
if (left < 0) { var left = (W - w) / 2, top = (H - h) / 2;
left = 0; if (left < 0) {
left = 0;
}
if (top < 0) {
top = 0;
}
floatbox.element.css({
left: left + "px",
top: top + "px"
});
} }
if (top < 0) {
top = 0;
}
floatbox.element.css({
left: left + "px",
top: top + "px"
});
return this; return this;
}, },
@ -111,8 +113,10 @@ BI.FloatBoxController = BI.inherit(BI.Controller, {
if (!this._check(name)) { if (!this._check(name)) {
return this; return this;
} }
this.floatContainer[name].invisible(); if (this.floatContainer[name].isVisible()) {
this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]); this.floatContainer[name].invisible();
this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]);
}
return this; return this;
}, },

Loading…
Cancel
Save