ObaidUrRehman / ng-drag-drop

Drag & Drop for Angular - based on HTML5 with no external dependencies. :tada:
MIT License
239 stars 123 forks source link

dragClass has no effect #176

Open peter-snr opened 5 years ago

peter-snr commented 5 years ago

Please remove sections that are not required.

Expected this:-

dragClass (previously dragOverClass) | string | 'drag-border' | CSS class applied on the draggable that is applied when the item is being dragged.

Applying dragClass has no effect. I have applied a dragClass but it has no effect, see example below

The dragHandle gets applied but not the dragClass

Create a div with draggable set. Create a CSS class for the dragClass. E.G.

 <div  [draggable]  [dragHandle]="'carousel-drag-handle'" [dragClass]="'carousel-drag'">

(related CSS file contains)
.carousel-drag {
  border:2px solid yellow;
  background-color: blue;
  max-width:20px;
  max-height:20px;
}

Expected a yellow border, i.e. the CSS being applied to the element whilst it is being dragged.

Angular CLI: 8.2.0 Node: 10.16.0 OS: linux x64 Angular: ...

Package Version

@angular-devkit/architect 0.802.0 @angular-devkit/core 8.2.0 @angular-devkit/schematics 8.2.0 @schematics/angular 8.2.0 @schematics/update 0.802.0 rxjs 6.4.0

Google Chrome 77.0.3865.90 (Official Build) (64-bit)
Revision 58c425ba843df2918d9d4b409331972646c393dd-refs/branch-heads/3865@{#830}
OS Linux
JavaScript V8 7.7.299.11