Commit e454f58f by Ooh-Ao

เรีนก widjet

parent da9585e5
body,
html {
overflow-y: auto !important;
overflow-x: hidden !important;
margin: 0 !important;
padding: 0 !important;
/* height: 200%; */
}
::-webkit-scrollbar {
width: 0px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.2);
border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
background: rgba(0, 0, 0, 0.4);
}
<div class="row" style="background-color:transparent;">
<div #rowWidjet class="row" style="background-color:transparent;">
<app-services [id]="item.id" *ngFor="let item of widgetList" class="col-{{item.width}}"
style="margin-top: 5px;"></app-services>
</div>
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { ServicesComponent } from '../services/services.component';
import { Service, WidjetService } from '../services/widjet.service';
import { CommonModule } from '@angular/common';
......@@ -13,6 +13,7 @@ import { ActivatedRoute } from '@angular/router';
encapsulation: ViewEncapsulation.None
})
export class LayoutWidjetComponent implements OnInit {
@ViewChild('rowWidjet', { static: false }) rowWidjet?: ElementRef;
appName = ""
widjetId = 0
widgetList: Service[] = []
......@@ -24,7 +25,14 @@ export class LayoutWidjetComponent implements OnInit {
}
ngAfterViewChecked(): void {
const rowWidjet = this.rowWidjet!.nativeElement;
const message = { type: 'greeting', text: rowWidjet.offsetHeight };
window.parent.postMessage(message, '*');
}
ngOnInit() {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment