Skip to content

Commit c143463

Browse files
committed
add rete-context-menu attribute for customization
1 parent e3e12da commit c143463

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/presets/context-menu/components/menu/menu.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, Input, ChangeDetectorRef, OnChanges, OnDestroy, HostListener } from '@angular/core';
1+
import { Component, Input, ChangeDetectorRef, OnChanges, OnDestroy, HostListener, HostBinding } from '@angular/core';
22
import { Item } from '../../types';
33
import { debounce } from '../../debounce';
44

@@ -23,6 +23,8 @@ export class ContextMenuComponent implements OnChanges, OnDestroy {
2323
this.cdr.detectChanges()
2424
})
2525

26+
@HostBinding('attr.rete-context-menu') customAttribute = ''
27+
2628
@HostListener('mouseover') pointerover() {
2729
this.hide.cancel()
2830
this.cdr.detectChanges()
@@ -32,7 +34,7 @@ export class ContextMenuComponent implements OnChanges, OnDestroy {
3234
this.cdr.detectChanges()
3335
}
3436

35-
constructor(private cdr: ChangeDetectorRef) {
37+
constructor(private cdr: ChangeDetectorRef) {
3638
this.cdr.detach()
3739
}
3840

0 commit comments

Comments
 (0)