Удалить свитки на угловом холстеHtml

Программисты Html
Ответить
Anonymous
 Удалить свитки на угловом холсте

Сообщение Anonymous »

У меня есть угловая версия 11.0.0.
Чтобы увидеть панели мониторинга других угловых приложений из моего, мне пришлось расширить как ширину, так и высоту до 110% и 900 px соответственно [



(ts) < /li>
< /ol>
@Component({
selector: 'app-thing-management',
templateUrl: './thing-management.component.html',
styles: [`
.dashboard-iframe {
background-color: white !important;
filter: none !important;
overflow: hidden !important;
width: 100% !important;
height: 100% !important;
}

/* Ensure the panel containing the iframe also has white background */
p-panel .p-panel-content {
background-color: white !important;
overflow: hidden !important;
padding: 0 !important;
}

/* Override any dark theme styles for the iframe container */
.p-panel .p-panel-content-wrapper {
background-color: white !important;
overflow: hidden !important;
}

/* Make sure the panel expands to fit content */
.p-panel {
height: auto !important;
min-height: 600px !important;
}
`]
})
< /code>

(ts) < /li>
< /ol>

async getSrc() {
// Add parameters for a full visualization without any scroll
let url = this.view.parameter['dashboardUrl'] +
(this.selectedThingIds.map(th => `var-thingId=${th}`)).join('&') +
'&kiosk&hideScrollbar=1&viewPanel=1&fullscreen';

// Update the URL of dashboard
this.viewDashboardUrl = url;

// Make sure the iframe fits rightly after loading
setTimeout(() => {
if (this.iframe && this.iframe.nativeElement) {
this.iframe.nativeElement.onload = () => {
try {
// try to comunicate with the iframe to fit its size
const iframeDoc = this.iframe.nativeElement.contentDocument ||
this.iframe.nativeElement.contentWindow.document;

if (iframeDoc) {
// Remove scrollbars from content of the iframe
const style = iframeDoc.createElement('style');
style.textContent = 'body { overflow: hidden !important; }';
iframeDoc.head.appendChild(style);
}
} catch (e) {
// Warning, we can not access the content
console.log('We can not access the content of iframe by security polícies');
}
};
}
}, 100);
}
[/code]
Я внес эти изменения, это стало хуже всего, потому что он разрезал все виды на панели панелей и было меньше.


Подробнее здесь: https://stackoverflow.com/questions/797 ... ion-canvas
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Html»