This repository was archived by the owner on Feb 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
app/pages/editor/app-editor Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff 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 ( ) }
Original file line number Diff line number Diff line change 88import '@stencil/core' ;
99
1010import '@ionic/core' ;
11+ import 'ionicons' ;
1112import 'deckdeckgo' ;
1213import 'deckdeckgo-inline-editor' ;
13- import 'ionicons' ;
1414import {
1515 EventEmitter ,
1616} from '@stencil/core' ;
You can’t perform that action at this time.
0 commit comments