|
|
@ -38,7 +38,7 @@ export class PopoverController extends Controller { |
|
|
|
type: "bi.popover", |
|
|
|
type: "bi.popover", |
|
|
|
}, context); |
|
|
|
}, context); |
|
|
|
this.add(name, popover, options, context); |
|
|
|
this.add(name, popover, options, context); |
|
|
|
|
|
|
|
|
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -58,8 +58,8 @@ export class PopoverController extends Controller { |
|
|
|
const popover = this.get(name); |
|
|
|
const popover = this.get(name); |
|
|
|
popover.show && popover.show(); |
|
|
|
popover.show && popover.show(); |
|
|
|
const render = this.getRender(); |
|
|
|
const render = this.getRender(); |
|
|
|
const W = Widget._renderEngine.createElement(render).width(), |
|
|
|
const el = Widget._renderEngine.createElement(render)[0]; |
|
|
|
H = Widget._renderEngine.createElement(render).height(); |
|
|
|
const W = el.clientWidth, H = el.clientHeight; |
|
|
|
const w = popover.element.width(), h = popover.element.height(); |
|
|
|
const w = popover.element.width(), h = popover.element.height(); |
|
|
|
let left = (W - w) / 2, top = (H - h) / 2; |
|
|
|
let left = (W - w) / 2, top = (H - h) / 2; |
|
|
|
if (left < 0) { |
|
|
|
if (left < 0) { |
|
|
@ -74,7 +74,7 @@ export class PopoverController extends Controller { |
|
|
|
top: `${top}px`, |
|
|
|
top: `${top}px`, |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -87,7 +87,7 @@ export class PopoverController extends Controller { |
|
|
|
this.floatContainer[name].invisible(); |
|
|
|
this.floatContainer[name].invisible(); |
|
|
|
this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]); |
|
|
|
this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -135,7 +135,7 @@ export class PopoverController extends Controller { |
|
|
|
bottom: 0, |
|
|
|
bottom: 0, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -167,7 +167,7 @@ export class PopoverController extends Controller { |
|
|
|
delete this.zindexMap[name]; |
|
|
|
delete this.zindexMap[name]; |
|
|
|
delete this.floatContainer[name]; |
|
|
|
delete this.floatContainer[name]; |
|
|
|
delete this.floatOpened[name]; |
|
|
|
delete this.floatOpened[name]; |
|
|
|
|
|
|
|
|
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -181,7 +181,7 @@ export class PopoverController extends Controller { |
|
|
|
this.floatContainer = {}; |
|
|
|
this.floatContainer = {}; |
|
|
|
this.floatOpened = {}; |
|
|
|
this.floatOpened = {}; |
|
|
|
this.zindexMap = {}; |
|
|
|
this.zindexMap = {}; |
|
|
|
|
|
|
|
|
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|