-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
79 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
// Base marker, with the props that are set by the editor. | ||
export type MarkerAnswers = { | ||
// The list of correct answers expected for the marker. Often only one but can have multiple | ||
answers: ReadonlyArray<string>; | ||
export type LabelImageMarker = { | ||
// Reveal the correctness state of the user selected answers for the marker. | ||
showCorrectness?: "correct" | "incorrect"; | ||
focused?: boolean; | ||
// Translatable Text; The text to show for the marker. Not displayed directly to the user | ||
label: string; | ||
// The marker coordinates on the question image as percent of image size. | ||
x: number; | ||
y: number; | ||
}; | ||
|
||
export type MarkerUserInput = { | ||
export type LabelImageMarkerScoringData = { | ||
// The list of correct answers expected for the marker. Often only one but can have multiple | ||
answers: ReadonlyArray<string>; | ||
}; | ||
|
||
export type LabelImageMarkerUserInput = { | ||
// The user selected list of answers, used to grade the question. | ||
selected?: ReadonlyArray<string>; | ||
// Reveal the correctness state of the user selected answers for the marker. | ||
showCorrectness?: "correct" | "incorrect"; | ||
focused?: boolean; | ||
}; | ||
|
||
// Additional props that are set when user interacts with the marker. | ||
export type InteractiveMarkerType = MarkerAnswers & MarkerUserInput; | ||
export type LabelImageFullMarker = LabelImageMarker & | ||
LabelImageMarkerScoringData & | ||
LabelImageMarkerUserInput; |