@@ -115,12 +115,10 @@ public override void BeforeSetPosition(PlacementOperation operation)
115115 if ( Snap ( horizontalInput , horizontalMap , Accuracy , out drawLines , out delta ) ) {
116116
117117 if ( operation . Type == PlacementType . Resize ) {
118- if ( info . ResizeThumbAlignment . Vertical == VerticalAlignment . Top ) {
119- bounds . Y += delta ;
120- bounds . Height = Math . Max ( 0 , bounds . Height - delta ) ;
121- } else {
122- bounds . Height = Math . Max ( 0 , bounds . Height + delta ) ;
118+ if ( info . ResizeThumbAlignment != null && info . ResizeThumbAlignment . Value . Vertical == VerticalAlignment . Top ) {
119+ bounds . Y += delta ;
123120 }
121+ bounds . Height = Math . Max ( 0 , bounds . Height - delta ) ;
124122 info . Bounds = bounds ;
125123 } else {
126124 foreach ( var item in operation . PlacedItems ) {
@@ -138,12 +136,10 @@ public override void BeforeSetPosition(PlacementOperation operation)
138136 if ( Snap ( verticalInput , verticalMap , Accuracy , out drawLines , out delta ) ) {
139137
140138 if ( operation . Type == PlacementType . Resize ) {
141- if ( info . ResizeThumbAlignment . Horizontal == HorizontalAlignment . Left ) {
142- bounds . X += delta ;
143- bounds . Width = Math . Max ( 0 , bounds . Width - delta ) ;
144- } else {
145- bounds . Width = Math . Max ( 0 , bounds . Width + delta ) ;
139+ if ( info . ResizeThumbAlignment != null && info . ResizeThumbAlignment . Value . Horizontal == HorizontalAlignment . Left ) {
140+ bounds . X += delta ;
146141 }
142+ bounds . Width = Math . Max ( 0 , bounds . Width - delta ) ;
147143 info . Bounds = bounds ;
148144 } else {
149145 foreach ( var item in operation . PlacedItems ) {
0 commit comments