chore(web): adjustments per PR review comments

This commit is contained in:
Joshua A. Horton 2023-10-23 15:14:32 +07:00
parent 90576d8524
commit 4ef2f8fe6c
2 changed files with 3 additions and 8 deletions

View file

@ -308,8 +308,6 @@ export class SuggestionBanner extends Banner {
private gestureEngine: GestureRecognizer<BannerSuggestion>;
// private manager: SuggestionInputManager;
private _predictionContext: PredictionContext;
static readonly TOUCHED_CLASS: string = 'kmw-suggest-touched';
@ -320,10 +318,8 @@ export class SuggestionBanner extends Banner {
this.hostDevice = hostDevice;
this.getDiv().className = this.getDiv().className + ' ' + SuggestionBanner.BANNER_CLASS;
this.buildInternals(false);
// this.manager = new SuggestionInputManager(this.getDiv());
this.events = new EventEmitter<SuggestionInputEventMap>(); //this.manager.events;
this.gestureEngine = this.setupInputHandling();
@ -387,8 +383,7 @@ export class SuggestionBanner extends Banner {
let bestMatch: BannerSuggestion = null;
let bestDist = Number.MAX_VALUE;
for(let i = 0; i < this.options.length; i++) {
const option = this.options[i];
for(const option of this.options) {
const optionBounding = option.div.getBoundingClientRect();
if(optionBounding.left <= sample.clientX && sample.clientX < optionBounding.right) {
@ -437,7 +432,7 @@ export class SuggestionBanner extends Banner {
sourceTracker.suggestion = suggestion;
}
};
sourceTracker.suggestion = source.currentSample.item
sourceTracker.suggestion = source.currentSample.item;
source.currentSample.item.highlight(true);

View file

@ -9,7 +9,7 @@ export enum PendingMultiTapState { Waiting, Realized, Cancelled };
* (based on key id substring in the case of the shift key), within a
* specified timeout period.
*/
export default class PendingMultiTap /*implements PendingGesture*/ {
export default class PendingMultiTap {
public readonly vkbd: VisualKeyboard;
public readonly baseKey: KeyElement;
public readonly count: number;