@@ -897,9 +897,6 @@ class QuickInputDragAndDropController extends Disposable {
897
897
898
898
private readonly _snapThreshold = 20 ;
899
899
private readonly _snapLineHorizontalRatio = 0.25 ;
900
- private readonly _snapLineHorizontal : HTMLElement ;
901
- private readonly _snapLineVertical1 : HTMLElement ;
902
- private readonly _snapLineVertical2 : HTMLElement ;
903
900
904
901
private _quickInputAlignmentContext = QuickInputAlignmentContextKey . bindTo ( this . _contextKeyService ) ;
905
902
@@ -911,22 +908,11 @@ class QuickInputDragAndDropController extends Disposable {
911
908
@IContextKeyService private readonly _contextKeyService : IContextKeyService
912
909
) {
913
910
super ( ) ;
914
-
915
- this . _snapLineHorizontal = dom . append ( this . _container , $ ( '.quick-input-widget-snapline.horizontal.hidden' ) ) ;
916
- this . _snapLineVertical1 = dom . append ( this . _container , $ ( '.quick-input-widget-snapline.vertical.hidden' ) ) ;
917
- this . _snapLineVertical2 = dom . append ( this . _container , $ ( '.quick-input-widget-snapline.vertical.hidden' ) ) ;
918
-
919
911
this . registerMouseListeners ( ) ;
920
912
}
921
913
922
914
reparentUI ( container : HTMLElement ) : void {
923
915
this . _container = container ;
924
- this . _snapLineHorizontal . remove ( ) ;
925
- this . _snapLineVertical1 . remove ( ) ;
926
- this . _snapLineVertical2 . remove ( ) ;
927
- dom . append ( this . _container , this . _snapLineHorizontal ) ;
928
- dom . append ( this . _container , this . _snapLineVertical1 ) ;
929
- dom . append ( this . _container , this . _snapLineVertical2 ) ;
930
916
}
931
917
932
918
setAlignment ( alignment : 'top' | 'center' | { top : number ; left : number } , done = true ) : void {
@@ -1000,7 +986,6 @@ class QuickInputDragAndDropController extends Disposable {
1000
986
mouseMoveEvent . preventDefault ( ) ;
1001
987
1002
988
if ( ! isMovingQuickInput ) {
1003
- this . _showSnapLines ( snapCoordinateY , snapCoordinateX ) ;
1004
989
isMovingQuickInput = true ;
1005
990
}
1006
991
@@ -1036,9 +1021,6 @@ class QuickInputDragAndDropController extends Disposable {
1036
1021
// Mouse up
1037
1022
const mouseUpListener = dom . addDisposableGenericMouseUpListener ( activeWindow , ( e : MouseEvent ) => {
1038
1023
if ( isMovingQuickInput ) {
1039
- // Hide snaplines
1040
- this . _hideSnapLines ( ) ;
1041
-
1042
1024
// Save position
1043
1025
const state = this . dndViewState . get ( ) ;
1044
1026
this . dndViewState . set ( { top : state ?. top , left : state ?. left , done : true } , undefined ) ;
@@ -1062,20 +1044,4 @@ class QuickInputDragAndDropController extends Disposable {
1062
1044
private _getCenterXSnapValue ( ) {
1063
1045
return Math . round ( this . _container . clientWidth / 2 ) - Math . round ( this . _quickInputContainer . clientWidth / 2 ) ;
1064
1046
}
1065
-
1066
- private _showSnapLines ( horizontal : number , vertical : number ) {
1067
- this . _snapLineHorizontal . style . top = `${ horizontal } px` ;
1068
- this . _snapLineVertical1 . style . left = `${ vertical } px` ;
1069
- this . _snapLineVertical2 . style . left = `${ vertical + this . _quickInputContainer . clientWidth } px` ;
1070
-
1071
- this . _snapLineHorizontal . classList . remove ( 'hidden' ) ;
1072
- this . _snapLineVertical1 . classList . remove ( 'hidden' ) ;
1073
- this . _snapLineVertical2 . classList . remove ( 'hidden' ) ;
1074
- }
1075
-
1076
- private _hideSnapLines ( ) {
1077
- this . _snapLineHorizontal . classList . add ( 'hidden' ) ;
1078
- this . _snapLineVertical1 . classList . add ( 'hidden' ) ;
1079
- this . _snapLineVertical2 . classList . add ( 'hidden' ) ;
1080
- }
1081
1047
}
0 commit comments