#569·dragula

TypeError: Failed to execute 'elementFromPoint' on 'Document': The provided double value is non-finite.

Author: eJunior08Created May 24, 2018Updated Sep 17, 2024
Labelsbug

When I'm dragging my element and this element has changed on Firebase (while I still on drag) the element is copied. So Im trying to use dragula.destroy('my-bag'); but I have the above error. I also have this error: TypeError: Cannot read property 'drake' of undefined.

My HTML:

<div class="col column-card" id="fila"  [style.height.px]="heightPage" [dragula]='"fila"' [dragulaOptions]="options">
...
</div>

My TS:

public itemsRef: AngularFireList<any>;
public items: Observable<any[]>;

constructor(
    db: AngularFireDatabase,
    private dragula: DragulaService,
  ) {

    this.itemsRef = db.list('CardPosition');

    this.items = this.itemsRef.snapshotChanges().map((changes) => {
      if (someChange()) {
        this.dragula.destroy('fila');
      }
      return changes.map((c) => ({ key: c.payload.key, ...c.payload.val() }));
    });

}