File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
src/vs/editor/contrib/colorPicker/browser Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,11 @@ import { IThemeService } from 'vs/platform/theme/common/themeService';
22
22
23
23
const $ = dom . $ ;
24
24
25
- function elementsOverlap ( el1 : HTMLElement , el2 : HTMLElement ) {
25
+ function elementsOverlapHorizontally ( el1 : HTMLElement , el2 : HTMLElement ) {
26
26
const domRect1 = el1 . getBoundingClientRect ( ) ;
27
27
const domRect2 = el2 . getBoundingClientRect ( ) ;
28
28
return ! (
29
- domRect1 . top > domRect2 . bottom ||
30
29
domRect1 . right < domRect2 . left ||
31
- domRect1 . bottom < domRect2 . top ||
32
30
domRect1 . left > domRect2 . right
33
31
) ;
34
32
}
@@ -83,7 +81,7 @@ export class ColorPickerHeader extends Disposable {
83
81
84
82
const resizeObserver = new ResizeObserver ( ( ) => {
85
83
this . _pickedColorRepresentation . style . display = 'block' ;
86
- if ( elementsOverlap ( this . _pickedColorRepresentation , icon ) ) {
84
+ if ( elementsOverlapHorizontally ( this . _pickedColorRepresentation , icon ) ) {
87
85
this . _pickedColorRepresentation . style . display = 'none' ;
88
86
} else {
89
87
this . _pickedColorRepresentation . style . display = 'block' ;
You can’t perform that action at this time.
0 commit comments