jqwidgets-scripts-custom
Version:
jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.
30 lines (22 loc) • 798 B
text/typescript
import { Component, ViewChild, ElementRef, AfterViewInit } from '@angular/core';
import { jqxTreeComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxtree';
({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent implements AfterViewInit {
('jqxTree') jqxTree: jqxTreeComponent;
('ContentPanel') ContentPanel: ElementRef;
getWidth() : any {
if (document.body.offsetWidth < 850) {
return '90%';
}
return 850;
}
ngAfterViewInit() {
this.jqxTree.elementRef.nativeElement.firstChild.style.border = 'none';
}
select(event: any): void {
this.ContentPanel.nativeElement.innerHTML = '<div style="margin: 10px;">' + event.args.element.id + '</div>';
};
}