Skip to content

Commit fd5acf4

Browse files
committed
feat(interacto): move to latest interacto version
1 parent 38eac05 commit fd5acf4

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

projects/interacto-angular/src/lib/base/angular-bindings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export type PartialMatSelectBinder = PartialMatSelectTypedBinder<unknown>;
1414
*/
1515
export class AngularBindings<H extends LinearHistoryBase> extends BindingsImpl<H> {
1616
public matSelectBinder<A>(accInit?: A): PartialMatSelectTypedBinder<A> {
17-
return new UpdateBinder(this.undoHistory, this.logger, this.observer, undefined, accInit)
17+
return new UpdateBinder(this.cmdhistory, this.logger, this.observer, undefined, accInit)
1818
.usingInteraction<MatSelectInteraction, A, MatChange<MatSelectChange>>(() => new MatSelectInteraction(this.logger));
1919
}
2020
}

projects/interacto-angular/src/lib/directives/redo-binder.directive.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class RedoBinderDirective extends InteractoBinderDirective<HTMLButtonElem
1818
viewContainerRef: ViewContainerRef,
1919
private readonly bindings: Bindings<LinearHistoryBase>) {
2020
super(undefined, element, viewContainerRef);
21-
this.redoObs = bindings.undoHistory
21+
this.redoObs = bindings.cmdhistory
2222
.redosObservable()
2323
.subscribe(() => {
2424
this.updateRedo();
@@ -33,8 +33,8 @@ export class RedoBinderDirective extends InteractoBinderDirective<HTMLButtonElem
3333

3434
private updateRedo(): void {
3535
const elt = this.getElementContent();
36-
elt.disabled = this.bindings.undoHistory.getLastRedo() === undefined;
37-
elt.title = this.bindings.undoHistory.getLastOrEmptyRedoMessage();
36+
elt.disabled = this.bindings.cmdhistory.getLastRedo() === undefined;
37+
elt.title = this.bindings.cmdhistory.getLastOrEmptyRedoMessage();
3838
}
3939

4040
public override ngAfterContentInit(): void {
@@ -55,7 +55,7 @@ export class RedoBinderDirective extends InteractoBinderDirective<HTMLButtonElem
5555
return this.bindings
5656
.buttonBinder()
5757
.on(this.element)
58-
.toProduce(() => new Redo(this.bindings.undoHistory));
58+
.toProduce(() => new Redo(this.bindings.cmdhistory));
5959
}
6060

6161
public override ngOnDestroy(): void {

projects/interacto-angular/src/lib/directives/undo-binder.directive.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class UndoBinderDirective extends InteractoBinderDirective<HTMLButtonElem
1919
viewContainerRef: ViewContainerRef,
2020
private readonly bindings: Bindings<LinearHistoryBase>) {
2121
super(undefined, element, viewContainerRef);
22-
this.undoObs = bindings.undoHistory
22+
this.undoObs = bindings.cmdhistory
2323
.undosObservable()
2424
.subscribe(() => {
2525
this.updateUndo();
@@ -34,8 +34,8 @@ export class UndoBinderDirective extends InteractoBinderDirective<HTMLButtonElem
3434

3535
private updateUndo(): void {
3636
const elt = this.getElementContent();
37-
elt.disabled = this.bindings.undoHistory.getLastUndo() === undefined;
38-
elt.title = this.bindings.undoHistory.getLastOrEmptyUndoMessage();
37+
elt.disabled = this.bindings.cmdhistory.getLastUndo() === undefined;
38+
elt.title = this.bindings.cmdhistory.getLastOrEmptyUndoMessage();
3939
}
4040

4141
public override ngAfterContentInit(): void {
@@ -56,7 +56,7 @@ export class UndoBinderDirective extends InteractoBinderDirective<HTMLButtonElem
5656
return this.bindings
5757
.buttonBinder()
5858
.on(this.element)
59-
.toProduce(() => new Undo(this.bindings.undoHistory));
59+
.toProduce(() => new Undo(this.bindings.cmdhistory));
6060
}
6161

6262
public override ngOnDestroy(): void {

projects/interacto-angular/src/lib/interacto-angular.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import {Bindings, TreeHistory, TreeHistoryImpl, LinearHistory, LinearHistoryImpl
4747
* @typeParam T -- The type of the undo history
4848
*/
4949
export function historyFactory<T extends LinearHistoryBase>(ctx: AngularBindings<T>): T {
50-
return ctx.undoHistory;
50+
return ctx.cmdhistory;
5151
}
5252

5353
/**

0 commit comments

Comments
 (0)