Skip to content

Commit

Permalink
style of current slide and slide starting with a clear action
Browse files Browse the repository at this point in the history
  • Loading branch information
Francois Schwarzentruber committed Mar 25, 2023
1 parent a403b55 commit 71fd423
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/AnimationToolBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { ActionFreeDraw } from './ActionFreeDraw';
import { MagnetHighlighter } from './MagnetHighlighter';
import { ActionMagnetNew } from './ActionMagnetNew';
import { ActionMagnetMove } from './ActionMagnetMove';
import { ActionClear } from './ActionClear';


/**
Expand All @@ -24,7 +25,7 @@ export class AnimationToolBar {
AnimationToolBar.selection = new SelectionActions();
AnimationToolBar.update();
}

static isSelection(): boolean { return !AnimationToolBar.selection.isEmpty; }

/**
Expand Down Expand Up @@ -68,6 +69,11 @@ export class AnimationToolBar {
slide.dataset.from = from + "";
slide.dataset.to = to + "";
slide.classList.add("slide");

if (from + 1 <= to)
if (BoardManager.timeline.actions[from + 1] instanceof ActionClear)
slide.classList.add("slideClear");

slide.title = "slide n°" + slideNumber;
slide.style.flexGrow = "" + Math.max(1, to - from);

Expand Down
9 changes: 8 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,10 @@ h1 {
}






.slide {
display: inline-block;
height: 8px;
Expand All @@ -1146,9 +1150,12 @@ h1 {
cursor: pointer;
}

.slideClear {
border-left: 2px solid rgb(128, 128, 255)
}

.slideCurrent {
border-left: 2px solid red;
border-bottom: 2px solid red;
}


Expand Down

0 comments on commit 71fd423

Please sign in to comment.