fix(core): update

This commit is contained in:
Philipp Kunz 2023-11-26 16:59:04 +01:00
parent 86366d86b9
commit 0d5dc9a82f
3 changed files with 49 additions and 43 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@design.estate/dees-document',
version: '1.0.96',
version: '1.0.97',
description: 'a catalog for creating documents like invoices'
}

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@design.estate/dees-document',
version: '1.0.96',
version: '1.0.97',
description: 'a catalog for creating documents like invoices'
}

View File

@ -47,7 +47,7 @@ export class DePage extends DeesElement {
@property({
type: Object,
})
public letterData: tsclass.business.ILetter = shared.demoLetter;
public letterData: tsclass.business.ILetter = null;
@property({
type: Boolean,
@ -109,6 +109,8 @@ export class DePage extends DeesElement {
return html`
<div id="scaleWrapper">
<dedocument-pagecontainer .printMode=${this.printMode}>
${this.letterData
? html`
<dedocument-pageheader
.letterData=${this.letterData}
.pageNumber="${this.pageNumber}"
@ -145,6 +147,10 @@ export class DePage extends DeesElement {
`
: html``}
</div>
`
: html`
<slot></slot>
`}
</dedocument-pagecontainer>
</div>
`;
@ -158,14 +164,14 @@ export class DePage extends DeesElement {
updated(changedProperties: Map<string | number | symbol, unknown>): void {
super.updated(changedProperties);
if (changedProperties.has("viewHeight") || changedProperties.has("viewWidth")) {
if (changedProperties.has('viewHeight') || changedProperties.has('viewWidth')) {
this.adjustScaling();
}
}
private adjustScaling() {
console.log('page scale adjustment triggered.')
const scaleWrapper: HTMLDivElement = this.shadowRoot.querySelector("#scaleWrapper");
console.log('page scale adjustment triggered.');
const scaleWrapper: HTMLDivElement = this.shadowRoot.querySelector('#scaleWrapper');
if (!scaleWrapper) return;