Skip to content

Commit

Permalink
[twizzle/edit] Handle stickering changes without a refresh.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarron committed Aug 28, 2021
1 parent 9bb6013 commit 7b5be8e
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions src/sites/alpha.twizzle.net/edit/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,26 +166,14 @@ export class App {
return true;
}

public setSetupAnchor(
setupAnchor: "start" | "end",
reload: boolean = true,
): boolean {
public setSetupAnchor(setupAnchor: "start" | "end"): void {
setURLParams({ "experimental-setup-anchor": setupAnchor });
if (reload) {
location.reload();
}
return true;
this.twistyPlayer.experimentalSetupAnchor = setupAnchor;
}

public setStickering(
stickering: ExperimentalStickering,
reload: boolean = true,
): boolean {
public setStickering(stickering: ExperimentalStickering): void {
setURLParams({ "experimental-stickering": stickering });
if (reload) {
location.reload();
}
return true;
this.twistyPlayer.experimentalStickering = stickering;
}

async solve(): Promise<void> {
Expand Down

0 comments on commit 7b5be8e

Please sign in to comment.