Skip to content

Commit

Permalink
fixed wrong order
Browse files Browse the repository at this point in the history
  • Loading branch information
christopher-besch committed Nov 20, 2021
1 parent 871b441 commit cb26c7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
6 changes: 4 additions & 2 deletions manim_editor/editor/create_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import List, Tuple

from .manim_loader import get_scenes
from .presentation_classes import Section, Slide
from .presentation_classes import Scene, Section, Slide

__all__ = ["create_project_dir", "populate_project_with_loaded_sections", "populate_project"]

Expand Down Expand Up @@ -64,7 +64,9 @@ def populate_project(project_name: str, scene_ids: List[int]) -> bool:
"""
print(f"Populating project '{project_name}'.")
# select scenes according to ids set by frontend
scenes = [scene for scene in get_scenes() if scene.id in scene_ids]
scenes_raw = get_scenes()
scenes = [scenes_raw[scene_id] for scene_id in scene_ids]

sections: List[Section] = []
for scene in scenes:
sections += scene.sections
Expand Down
9 changes: 2 additions & 7 deletions web_src/ts/presenter/presentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,7 @@ export abstract class Presentation {
case SectionType.SKIP:
next_element.onended = (_) => {
// immediately go to next section without user input
++this.current_section;
this.next_section = this.current_section;
this.set_time_stamp();
this.update_video();
this.play_section(this.current_section + 1, true);
}
break;
case SectionType.LOOP:
Expand All @@ -112,9 +109,7 @@ export abstract class Presentation {
next_element.onended = (_) => {
// when next section has changed, go to next one
// otherwise restart
this.current_section = this.next_section;
this.set_time_stamp();
this.update_video();
this.play_section(this.next_section, true);
}
break;
// SectionType.NORMAL
Expand Down

0 comments on commit cb26c7b

Please sign in to comment.