@@ -4,42 +4,42 @@ import { baseOptions } from "../../shared/base-options";
44let instance : Instance | null = null ;
55
66const createGroupedRadioButtons = async ( instance : Instance | null ) => {
7- const radioWidget1 = new window . NutrientViewer . Annotations . WidgetAnnotation ( {
8- id : window . NutrientViewer . generateInstantId ( ) ,
7+ const radioWidget1 = new NutrientViewer . Annotations . WidgetAnnotation ( {
8+ id : NutrientViewer . generateInstantId ( ) ,
99 pageIndex : 0 ,
1010 formFieldName : "MyFormField" ,
11- boundingBox : new window . NutrientViewer . Geometry . Rect ( {
11+ boundingBox : new NutrientViewer . Geometry . Rect ( {
1212 left : 100 ,
1313 top : 100 ,
1414 width : 20 ,
1515 height : 20 ,
1616 } ) ,
1717 } ) ;
1818
19- const radioWidget2 = new window . NutrientViewer . Annotations . WidgetAnnotation ( {
20- id : window . NutrientViewer . generateInstantId ( ) ,
19+ const radioWidget2 = new NutrientViewer . Annotations . WidgetAnnotation ( {
20+ id : NutrientViewer . generateInstantId ( ) ,
2121 pageIndex : 0 ,
2222 formFieldName : "MyFormField" ,
23- boundingBox : new window . NutrientViewer . Geometry . Rect ( {
23+ boundingBox : new NutrientViewer . Geometry . Rect ( {
2424 left : 130 ,
2525 top : 100 ,
2626 width : 20 ,
2727 height : 20 ,
2828 } ) ,
2929 } ) ;
3030
31- const formField = new window . NutrientViewer . FormFields . RadioButtonFormField ( {
31+ const formField = new NutrientViewer . FormFields . RadioButtonFormField ( {
3232 name : "MyFormField" ,
33- annotationIds : window . NutrientViewer . Immutable . List ( [
33+ annotationIds : new NutrientViewer . Immutable . List ( [
3434 radioWidget1 . id ,
3535 radioWidget2 . id ,
3636 ] ) ,
37- options : window . NutrientViewer . Immutable . List ( [
38- new window . NutrientViewer . FormOption ( {
37+ options : new NutrientViewer . Immutable . List ( [
38+ new NutrientViewer . FormOption ( {
3939 label : "Option 1" ,
4040 value : "1" ,
4141 } ) ,
42- new window . NutrientViewer . FormOption ( {
42+ new NutrientViewer . FormOption ( {
4343 label : "Option 2" ,
4444 value : "2" ,
4545 } ) ,
@@ -57,11 +57,11 @@ const item: ToolbarItem = {
5757 onPress : ( ) => createGroupedRadioButtons ( instance ) ,
5858} ;
5959
60- window . NutrientViewer . load ( {
60+ NutrientViewer . load ( {
6161 ...baseOptions ,
62- theme : window . NutrientViewer . Theme . DARK ,
62+ theme : NutrientViewer . Theme . DARK ,
6363 toolbarItems : [
64- ...window . NutrientViewer . defaultToolbarItems ,
64+ ...NutrientViewer . defaultToolbarItems ,
6565 { type : "form-creator" } ,
6666 ] ,
6767} ) . then ( ( _instance : Instance ) => {
0 commit comments