Skip to content

Commit

Permalink
Size of content is now calculated before it's appended to DOM
Browse files Browse the repository at this point in the history
  • Loading branch information
dimsemenov committed Jul 22, 2022
1 parent 266c7b2 commit 4bb8a7e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/js/slide/slide.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,19 @@ class Slide {
append(holderElement) {
this.holderElement = holderElement;

this.container.style.transformOrigin = '0 0';

// Slide appended to DOM
if (!this.data) {
return;
}

this.calculateSize();

this.container.style.transformOrigin = '0 0';

this.load();
this.appendHeavy();
this.updateContentSize();
this.appendHeavy();

this.holderElement.innerHTML = '';
this.holderElement.appendChild(this.container);

this.zoomAndPanToInitial();
Expand Down

0 comments on commit 4bb8a7e

Please sign in to comment.