File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed
src/LiveDevelopment/BrowserScripts Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -1875,6 +1875,28 @@ function RemoteFunctions(config = {}) {
18751875 topPos = offsetBounds . top ;
18761876 break ;
18771877
1878+ case 'top-adjusted' :
1879+ // 30px is estimated height of options box
1880+ leftPos = offsetBounds . left ;
1881+ topPos = offsetBounds . top - boxDimensions . height - verticalOffset - 30 ;
1882+ break ;
1883+
1884+ case 'bottom-adjusted' :
1885+ leftPos = offsetBounds . left ;
1886+ topPos = offsetBounds . top + elemBounds . height + verticalOffset + 30 ;
1887+ break ;
1888+
1889+ case 'left-adjusted' :
1890+ // 5px is just some extra spacing to handle some edge cases
1891+ leftPos = offsetBounds . left - boxDimensions . width + elemBounds . width - 5 ;
1892+ topPos = offsetBounds . top + elemBounds . height + verticalOffset + 5 ;
1893+ break ;
1894+
1895+ case 'right-adjusted' :
1896+ leftPos = offsetBounds . left + elemBounds . width + horizontalOffset + 5 ;
1897+ topPos = offsetBounds . top + elemBounds . height + verticalOffset - 5 ;
1898+ break ;
1899+
18781900 case 'inside-top-left' :
18791901 leftPos = offsetBounds . left ;
18801902 topPos = offsetBounds . top ;
@@ -1998,9 +2020,13 @@ function RemoteFunctions(config = {}) {
19982020 'left' ,
19992021 'right' ,
20002022 'bottom-left' ,
2023+ 'top-adjusted' ,
2024+ 'bottom-adjusted' ,
2025+ 'left-adjusted' ,
2026+ 'right-adjusted' ,
20012027 'inside-top-left'
20022028 ] ,
2003- 'options-box' : [
2029+ 'options-box' : [ // we don't need adjusted positioning for options box as it gets placed before info box
20042030 'top-right' ,
20052031 'right' ,
20062032 'left' ,
You can’t perform that action at this time.
0 commit comments