import { Tree } from '../tree' ; import { ElementRef } from '@angular/core' ; export class CapturedNode { public constructor ( private anElement , private aTree ) { } public canBeDroppedAt ( element ) { return ! this . sameAs ( element ) && ! this . contains ( element ) ; } public contains ( other ) { return this . element . nativeElement . contains ( other . nativeElement ) ; } public sameAs ( other ) { return this . element === other ; } public get element ( ) : ElementRef { return this . anElement ; } public get tree ( ) : Tree { return this . aTree ; } }