Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit f43a9e5

Browse files
fix: lazy load content specially gifs
1 parent b5e6ac6 commit f43a9e5

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

studio/src/app/pages/editor/app-editor/app-editor.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export class AppEditor {
179179
}
180180

181181
if (deck.hasChildNodes()) {
182-
await this.slideTo(deck.children.length);
182+
await this.slideTo(deck.children && deck.children.length > 0 ? deck.children.length - 1 : 0);
183183
}
184184
}
185185

@@ -300,7 +300,6 @@ export class AppEditor {
300300

301301
private async addSlide(slide: any) {
302302
await this.concatSlide(slide);
303-
await this.slideToLastSlide();
304303
}
305304

306305
private async openGifPicker() {
@@ -311,8 +310,6 @@ export class AppEditor {
311310
modal.onDidDismiss().then(async (detail: OverlayEventDetail) => {
312311
if (detail.data) {
313312
await this.addSlide(detail.data);
314-
315-
// TODO: call lazy load
316313
}
317314
});
318315

@@ -479,6 +476,7 @@ export class AppEditor {
479476
<ion-content padding>
480477
<main class={this.displaying ? 'idle' : undefined}>
481478
<deckgo-deck embedded={true}
479+
onSlidesDidLoad={() => this.slideToLastSlide()}
482480
onMouseDown={(e: MouseEvent) => this.deckTouched(e)}
483481
onTouchStart={(e: TouchEvent) => this.deckTouched(e)}
484482
onSlideNextDidChange={() => this.hideToolbar()}

studio/src/components.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
import '@stencil/core';
99

1010
import '@ionic/core';
11+
import 'ionicons';
1112
import 'deckdeckgo';
1213
import 'deckdeckgo-inline-editor';
13-
import 'ionicons';
1414
import {
1515
EventEmitter,
1616
} from '@stencil/core';

0 commit comments

Comments
 (0)