Skip to content

Commit

Permalink
余計なものを削除。
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanasu committed Oct 17, 2023
1 parent cad19a2 commit a500199
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion src/app/component/chat-palette/chat-palette.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</div>
</div>
<div *ngIf="!isEdit" style="flex-grow: 1; height: 0; min-height: 100px;">
<select #chatPlette class="palette" style="overflow-y: auto;" size="5" (keydown.enter)="chatInputComponent.sendChat(null)" (input)="selectPalette(chatPlette.value)" (click)="clickPalette(chatPlette.value)">
<select #chatPlette class="palette" style="overflow-y: auto;" size="5" (keydown.enter)="chatInputComponent.sendChat(null)" (click)="clickPalette(chatPlette.value)">
<ng-container *ngIf="palette">
<ng-container *ngFor="let palette of palette.getPalette()">
<option *ngIf="filter(palette)" value="{{palette}}" [style.color]="color">{{palette}}</option>
Expand Down
10 changes: 0 additions & 10 deletions src/app/component/chat-palette/chat-palette.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,6 @@ export class ChatPaletteComponent implements OnInit, OnDestroy {
this.updatePanelTitle();
}

selectPalette(line: string) {
this.text = line;
/* 作りかけ、とりあえず封印
setTimeout(() => {
this.filterText = line;
}, 300);
*/
}

clickPalette(line: string) {
if (!this.chatPletteElementRef.nativeElement) return;
const evaluatedLine = this.palette.evaluate(line, this.character.rootDataElement);
Expand Down Expand Up @@ -166,7 +157,6 @@ export class ChatPaletteComponent implements OnInit, OnDestroy {
}

filter(value: string): boolean {
console.log(this.filterText)
if (this.filterText == null || this.filterText.trim() == '') return true;
return StringUtil.toHalfWidth(value.replace(/[―ー—‐]/g, '-')).replace(/[\r\n\s]+/, ' ').trim().indexOf(StringUtil.toHalfWidth(this.filterText.replace(/[―ー—‐]/g, '-')).replace(/[\r\n\s]+/, ' ').trim()) >= 0;
}
Expand Down

0 comments on commit a500199

Please sign in to comment.