mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-26 02:07:42 +00:00
chore(common/models): Merge branch 'feat/common/models/model-dependent-revert-annotation' into feat/common/models/acceptance-context-tracking
This commit is contained in:
commit
505b5239c1
3 changed files with 5 additions and 5 deletions
|
|
@ -186,7 +186,7 @@ namespace com.keyman.text.prediction {
|
|||
return this.predict_internal(transcription);
|
||||
}
|
||||
|
||||
public applySuggestion(suggestion: Suggestion, outputTarget: OutputTarget): Promise<Suggestion> {
|
||||
public applySuggestion(suggestion: Suggestion, outputTarget: OutputTarget): Promise<Reversion> {
|
||||
if(!outputTarget) {
|
||||
throw "Accepting suggestions requires a destination OutputTarget instance."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ class ModelCompositor {
|
|||
return {
|
||||
transform: suggestion.transform,
|
||||
transformId: suggestion.transformId,
|
||||
displayAs: QuoteBehavior.apply(quoteBehavior, suggestion.displayAs, this.punctuation, QuoteBehavior.useQuotes),
|
||||
displayAs: QuoteBehavior.apply(quoteBehavior, suggestion.displayAs, this.punctuation, defaultQuoteBehavior),
|
||||
tag: annotationType,
|
||||
p: suggestion.p
|
||||
};
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ namespace com.keyman.osk {
|
|||
* @param target (Optional) The OutputTarget to which the `Suggestion` ought be applied.
|
||||
* Description Applies the predictive `Suggestion` represented by this `BannerSuggestion`.
|
||||
*/
|
||||
public apply(target?: text.OutputTarget): Promise<Suggestion> {
|
||||
public apply(target?: text.OutputTarget): Promise<Reversion> {
|
||||
let keyman = com.keyman.singleton;
|
||||
|
||||
if(this.isEmpty()) {
|
||||
|
|
@ -531,13 +531,13 @@ namespace com.keyman.osk {
|
|||
|
||||
private currentSuggestions: Suggestion[] = [];
|
||||
private keepSuggestion: Suggestion;
|
||||
private revertSuggestion: Suggestion;
|
||||
private revertSuggestion: Reversion;
|
||||
|
||||
private currentTranscriptionID: number;
|
||||
|
||||
private recentAccept: boolean = false;
|
||||
private recentAccepted: Suggestion;
|
||||
private revertAcceptancePromise: Promise<Suggestion>;
|
||||
private revertAcceptancePromise: Promise<Reversion>;
|
||||
|
||||
private preAccept: text.Transcription = null;
|
||||
private swallowPrediction: boolean = false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue