quicksave

This commit is contained in:
Schmelczer András 2019-12-30 10:59:05 +01:00
parent 5587b14e20
commit 2ee4e36888
6 changed files with 27 additions and 16 deletions

View file

@ -12,6 +12,8 @@ import { generate } from "./background.html";
export class PageBackground extends PageElement {
private blobs: Array<Blob> = [];
private blobSpacing = 350;
private previousWidth: number;
private previousHeight: number;
public constructor(private start: PageElement, private end: PageElement) {
super();
@ -41,6 +43,13 @@ export class PageBackground extends PageElement {
if (heightChange) {
height += heightChange;
}
if (this.previousHeight === height && this.previousWidth === width) {
return;
}
this.previousHeight = height;
this.previousWidth = width;
this.getElement().style.width = `${width}px`;
this.getElement().style.height = `${height}px`;