mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-30 09:18:12 +00:00
navigate to start, end, and zero
This commit is contained in:
@@ -159,7 +159,11 @@ export class AnimEditorElement extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jumpToStart(): void {
|
jumpToStart(): void {
|
||||||
this.playHead = this.clipStart;
|
if (Math.abs(this.playHead - this.clipStart) < 0.0001) {
|
||||||
|
this.playHead = 0;
|
||||||
|
} else {
|
||||||
|
this.playHead = this.clipStart;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
prevKeyframe(): void {
|
prevKeyframe(): void {
|
||||||
@@ -178,7 +182,7 @@ export class AnimEditorElement extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (closest_keyframe < 0) {
|
if (closest_keyframe < 0) {
|
||||||
return;
|
closest_keyframe = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.playHead = closest_keyframe;
|
this.playHead = closest_keyframe;
|
||||||
@@ -244,7 +248,7 @@ export class AnimEditorElement extends LitElement {
|
|||||||
|
|
||||||
let timeline_css_variables = {
|
let timeline_css_variables = {
|
||||||
'--track-count': `${this.trackCount()}`,
|
'--track-count': `${this.trackCount()}`,
|
||||||
'--row-count': `calc(var(--track-count) + ${can_add_selected ? 2 : 1})`,
|
'--row-count': `calc(var(--track-count) + ${can_add_selected ? 3 : 2})`,
|
||||||
'--clip-end': `${clip_end * 100}%`,
|
'--clip-end': `${clip_end * 100}%`,
|
||||||
'--clip-start': `${clip_start * 100}%`
|
'--clip-start': `${clip_start * 100}%`
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -23,6 +23,14 @@
|
|||||||
&.panning {
|
&.panning {
|
||||||
cursor: grabbing;
|
cursor: grabbing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.zoom-controls {
|
||||||
|
grid-row: var(--row-count);
|
||||||
|
background: rgba(0,0,0,1);
|
||||||
|
height: 10px;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.hash {
|
.hash {
|
||||||
|
|||||||
Reference in New Issue
Block a user