1.2.8 • Published 6 years ago

d-d-material-style v1.2.8

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

d-d-material-style

drag and drop with material style

Demo

https://angular-jd6bgy.stackblitz.io/ or stackblitz editor

Install

npm i d-d-material-style --save

Setup

import { DDMaterialStyleModule } from 'd-d-material-style';

@NgModule({
  ...
  imports:      [ ..., DDMaterialStyleModule ],
  ...
})

Use Directive

<div ddMatStyle>Dragable div</div>
<div class="limit-box" #container>
  <div [ddMatStyle]='container'>Dragable div inner div.limit-box</div>
</div>

Directive config

@Input() config: {direction?: 'x' | 'y' | 'grid', matClick?: boolean, shadow?: boolean, elem?: any, swipe?: string}
@Output() dChange: EventEmitter<IEvent>
@Output() dDrop: EventEmitter<IEvent>
IEvent = {
  type: 'change' | 'drop';
  point: {...};
  elem: {...} | any;
  collection: {...}[] | any;
}

See at example.

Use Component with Directive

<div class="vertical-box" #container>
  <d-d-material-style [config]="{direction: 'y', shadow: true}">
    <div class='item {{ el.style }}' *ngFor="let el of miniCollect" [ddMatStyle]="container">
      <span>{{ el.data }}</span>
    </div>
  </d-d-material-style>
</div>

Component config

@Input() config: {direction?: 'x' | 'y' | 'grid', matClick?: boolean, shadow?: boolean, collection?: any[], swipe?: string}
@Output() dChange: EventEmitter<IEvent>
@Output() dDrop: EventEmitter<IEvent>

See at example.

1.2.8

6 years ago

1.2.7

6 years ago

1.2.6

6 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.29

6 years ago

1.1.28

6 years ago

1.1.27

6 years ago

1.1.26

6 years ago

1.1.25

6 years ago

1.1.24

6 years ago

1.1.23

6 years ago

1.1.22

6 years ago

1.1.21

6 years ago

1.1.20

6 years ago

1.1.19

6 years ago

1.1.18

6 years ago

1.1.17

6 years ago

1.1.16

6 years ago

1.1.15

6 years ago

1.1.14

6 years ago

1.1.13

6 years ago

1.1.12

6 years ago

1.1.11

6 years ago

1.1.10

6 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago