@ -28,7 +28,8 @@
var originalRender = BI . Widget . _renderEngine ;
var injectSearchSearchStop = BI . Searcher . prototype . _stopSearch ;
var injectTooltipsShow = BI . TooltipsController . prototype . show ;
var injectSwitcherPopup = BI . Switcher . prototype . adjustView ;
var injectSwitcherPopup = BI . Switcher . prototype . populate ;
var injectSwitcherAdjustView = BI . Switcher . prototype . adjustView ;
var injectCreate = BI . createWidget ;
var callback = function ( ) { } ;
@ -356,7 +357,7 @@
}
BI . Searcher . prototype . _stopSearch = function ( ) {
injectSearchSearchStop . call ( this , arguments ) ;
injectSearchSearchStop . apply ( this , arguments ) ;
if ( this . popupView && this . popupView . element [ 0 ] . parentElement ) {
this . popupView . element [ 0 ] . parentElement . style . transform = "" ;
this . popupView . element [ 0 ] . parentElement . style . transformOrigin = "" ;
@ -364,8 +365,20 @@
}
// switcher
BI . Switcher . prototype . populate = function ( items ) {
injectSwitcherPopup . apply ( this , arguments ) ;
var self = this ;
BI . defer ( function ( ) {
if ( self . popupView ) {
self . popupView . element [ 0 ] . parentElement . style . left = parseInt ( self . popupView . element [ 0 ] . parentElement . style . left ) * scale + "px" ;
self . popupView . element [ 0 ] . parentElement . style . top = parseInt ( self . popupView . element [ 0 ] . parentElement . style . top ) * scale + "px" ;
self . popupView . element [ 0 ] . parentElement . style . transform = "scale(" + scale + ")" ;
self . popupView . element [ 0 ] . parentElement . style . transformOrigin = "left top" ;
}
} )
}
BI . Switcher . prototype . adjustView = function ( ) {
injectSwitcherPopup . call ( this , arguments ) ;
injectSwitcherAdjustView . apply ( this , arguments ) ;
if ( this . popupView ) {
this . popupView . element [ 0 ] . parentElement . style . left = parseInt ( this . popupView . element [ 0 ] . parentElement . style . left ) * scale + "px" ;
this . popupView . element [ 0 ] . parentElement . style . top = parseInt ( this . popupView . element [ 0 ] . parentElement . style . top ) * scale + "px" ;
@ -480,7 +493,8 @@
BI . Widget . registerRenderEngine ( originalRender ) ;
callback = function ( ) { }
BI . Switcher . prototype . adjustView = injectSwitcherPopup ;
BI . Switcher . prototype . populate = injectSwitcherPopup ;
BI . Switcher . prototype . adjustView = injectSwitcherAdjustView ;
BI . TooltipsController . prototype . show = injectTooltipsShow ;
document . body . onmousedown = null ;