jqwidgets-framework
Version:
jQWidgets is an advanced Angular, Vue, Blazor, React, Web Components, jquery, ASP .NET MVC, Custom Elements and HTML5 UI framework.
36 lines (31 loc) • 1.1 kB
text/typescript
import { Component, ViewChild, ElementRef } from '@angular/core';
export class AppComponent {
splitter1: ElementRef;
splitter2: ElementRef;
getWidth(): any {
if (document.body.offsetWidth < 850) {
return '90%';
}
return 850;
}
initTabContent = (tab: number): void => {
if (tab === 0 && this.splitter1) {
jqwidgets.createInstance(this.splitter1.nativeElement, 'jqxSplitter', {
height: '100%',
width: '100%',
panels: [{ size: '50%' }]
});
} else if (tab === 1 && this.splitter2) {
jqwidgets.createInstance(this.splitter2.nativeElement, 'jqxSplitter', {
orientation: 'horizontal',
height: '100%',
width: '100%',
panels: [{ size: '50%' }]
});
}
}
}