@@ -152,6 +152,8 @@ export class IgxDragLocation {
152152export class IgxDragDirective implements AfterContentInit , OnDestroy {
153153
154154 protected ghostContext : any = null ;
155+ protected _hideBaseOnDrag = false ;
156+ protected _animateOnRelease = false ;
155157
156158 /**
157159 * - Save data inside the `igxDrag` directive. This can be set when instancing `igxDrag` on an element.
@@ -232,7 +234,12 @@ export class IgxDragDirective implements AfterContentInit, OnDestroy {
232234 @DeprecateProperty ( `'hideBaseOnDrag' @Input property is deprecated and will be removed in future major versions.
233235 Alternatives to it are using the new no ghost dragging and custom base styling.` )
234236 @Input ( )
235- public hideBaseOnDrag = false ;
237+ get hideBaseOnDrag ( ) {
238+ return this . _hideBaseOnDrag ;
239+ }
240+ set hideBaseOnDrag ( val ) {
241+ this . _hideBaseOnDrag = val ;
242+ }
236243
237244 /**
238245 * @deprecated Please use provided transition functions in future.
@@ -249,7 +256,12 @@ export class IgxDragDirective implements AfterContentInit, OnDestroy {
249256 @DeprecateProperty ( `'animateOnRelease' @Input property is deprecated and will be removed in future major versions.
250257 Please use 'transitionToOrigin' or 'transitionTo' methods instead.` )
251258 @Input ( )
252- public animateOnRelease = false ;
259+ get animateOnRelease ( ) {
260+ return this . _animateOnRelease ;
261+ }
262+ set animateOnRelease ( val ) {
263+ this . _animateOnRelease = val ;
264+ }
253265
254266 /**
255267 * An @Input property that specifies a template for the ghost element created when dragging starts and `ghost` is true.
@@ -1011,7 +1023,7 @@ export class IgxDragDirective implements AfterContentInit, OnDestroy {
10111023 if ( this . _dragStarted ) {
10121024 if ( this . _lastDropArea && this . _lastDropArea !== this . element . nativeElement ) {
10131025 this . dispatchDropEvent ( event . pageX , event . pageY , event ) ;
1014- } else if ( this . animateOnRelease ) {
1026+ } else if ( this . _animateOnRelease ) {
10151027 this . transitionToOrigin ( ) ;
10161028 }
10171029
@@ -1056,7 +1068,7 @@ export class IgxDragDirective implements AfterContentInit, OnDestroy {
10561068 this . zone . run ( ( ) => {
10571069 this . dragEnd . emit ( eventArgs ) ;
10581070 } ) ;
1059- if ( this . animateOnRelease ) {
1071+ if ( this . _animateOnRelease ) {
10601072 this . transitionToOrigin ( ) ;
10611073 } else if ( ! this . animInProgress ) {
10621074 this . onTransitionEnd ( null ) ;
@@ -1146,7 +1158,7 @@ export class IgxDragDirective implements AfterContentInit, OnDestroy {
11461158 } ) ;
11471159
11481160 // Hide the base after the ghostElement is created, because otherwise the ghostElement will be not visible.
1149- if ( this . hideBaseOnDrag ) {
1161+ if ( this . _hideBaseOnDrag ) {
11501162 this . visible = false ;
11511163 }
11521164
@@ -1239,7 +1251,7 @@ export class IgxDragDirective implements AfterContentInit, OnDestroy {
12391251 return ;
12401252 }
12411253
1242- if ( this . hideBaseOnDrag ) {
1254+ if ( this . _hideBaseOnDrag ) {
12431255 this . visible = true ;
12441256 }
12451257 this . ghostElement . parentNode . removeChild ( this . ghostElement ) ;
0 commit comments