@webwriter/geogebra 1.1.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +280 -124
- package/custom-elements.json +2255 -1259
- package/dist/chunks/af-35CD6HFH.js +12 -0
- package/dist/chunks/am-JMDT5LI7.js +12 -0
- package/dist/chunks/ar-JL4QKYYL.js +12 -0
- package/dist/chunks/az-3SZS6WCY.js +12 -0
- package/dist/chunks/be-C4GWVHR2.js +12 -0
- package/dist/chunks/bg-6QGE5EQ4.js +12 -0
- package/dist/chunks/bn-UM2BV46R.js +12 -0
- package/dist/chunks/bs-XE2PWKCS.js +12 -0
- package/dist/chunks/ca-ZO2BQKPZ.js +12 -0
- package/dist/chunks/ca-balear-GJKWY5R7.js +12 -0
- package/dist/chunks/ca-valencia-CNQYSJSJ.js +12 -0
- package/dist/chunks/chunk-ANJTU3IB.js +203 -0
- package/dist/chunks/chunk-BSUFUO7E.js +65 -0
- package/dist/chunks/chunk-RYZMQM25.js +789 -0
- package/dist/chunks/cnr-MCZGASOD.js +12 -0
- package/dist/chunks/cs-4Q7FRISG.js +12 -0
- package/dist/chunks/cy-7VXG3AYH.js +12 -0
- package/dist/chunks/da-VDMHGBXD.js +12 -0
- package/dist/chunks/de-AT-YM5GCI75.js +12 -0
- package/dist/chunks/de-CH-LQNHTGYT.js +12 -0
- package/dist/chunks/de-GJT7RSHT.js +12 -0
- package/dist/chunks/el-ZVUVWEQ3.js +12 -0
- package/dist/chunks/en-AU-PCIYYC4M.js +12 -0
- package/dist/chunks/en-CA-37T7YUIL.js +12 -0
- package/dist/chunks/en-GB-ZYCA2CIZ.js +12 -0
- package/dist/chunks/en-IN-EPHXLNO6.js +12 -0
- package/dist/chunks/en-US-ECSJ5HDL.js +12 -0
- package/dist/chunks/es-5VBYK2HE.js +12 -0
- package/dist/chunks/et-OFQRRTW6.js +12 -0
- package/dist/chunks/eu-7TNOYFB7.js +12 -0
- package/dist/chunks/fa-KZU6GKWU.js +12 -0
- package/dist/chunks/fi-THJEKJPW.js +12 -0
- package/dist/chunks/fr-MUVVTBQZ.js +12 -0
- package/dist/chunks/ga-UWUVCWOT.js +12 -0
- package/dist/chunks/gl-NHQ52YCN.js +12 -0
- package/dist/chunks/gu-HVDD4QHO.js +12 -0
- package/dist/chunks/ha-2BPTATOZ.js +12 -0
- package/dist/chunks/he-MDESCUHJ.js +12 -0
- package/dist/chunks/hi-C6BGPR4Y.js +12 -0
- package/dist/chunks/hr-77MP3ELT.js +12 -0
- package/dist/chunks/hu-7PRNX6NB.js +12 -0
- package/dist/chunks/hy-R3VEL63L.js +12 -0
- package/dist/chunks/id-O6B2T3Y2.js +12 -0
- package/dist/chunks/is-XLNS5CAZ.js +12 -0
- package/dist/chunks/it-NZODUGUP.js +12 -0
- package/dist/chunks/ja-FFK5WXSB.js +12 -0
- package/dist/chunks/jv-GS3IRAIB.js +12 -0
- package/dist/chunks/ka-NWIJAO54.js +12 -0
- package/dist/chunks/kk-WQFRFG44.js +12 -0
- package/dist/chunks/km-AUKBN3YT.js +12 -0
- package/dist/chunks/kn-PKZFPECM.js +12 -0
- package/dist/chunks/ko-XNGAWKQ4.js +12 -0
- package/dist/chunks/ky-AQTYDJIL.js +12 -0
- package/dist/chunks/la-ERS7V4N4.js +12 -0
- package/dist/chunks/lb-KU3DVPI4.js +12 -0
- package/dist/chunks/locale-codes-TGY5LMYX.js +11 -0
- package/dist/chunks/lt-6RI4HSG3.js +12 -0
- package/dist/chunks/lv-RGIUQVA7.js +12 -0
- package/dist/chunks/mk-JMAYXTCL.js +12 -0
- package/dist/chunks/ml-5ZAIPAYV.js +12 -0
- package/dist/chunks/mn-N2GZBVDP.js +12 -0
- package/dist/chunks/mr-2SRCJIBC.js +12 -0
- package/dist/chunks/ms-WHD5PUQM.js +12 -0
- package/dist/chunks/mt-EXRK5UO6.js +12 -0
- package/dist/chunks/my-D2COGDRI.js +12 -0
- package/dist/chunks/nb-3XNBS2DU.js +12 -0
- package/dist/chunks/ne-PA4KUBGU.js +12 -0
- package/dist/chunks/nl-QMM3PBPM.js +12 -0
- package/dist/chunks/nn-CLFEMF2K.js +12 -0
- package/dist/chunks/no-CV376NZG.js +12 -0
- package/dist/chunks/or-KP7CET7X.js +12 -0
- package/dist/chunks/pa-CH5JYVXT.js +12 -0
- package/dist/chunks/pl-DDW4HT7M.js +12 -0
- package/dist/chunks/pt-BR-CVNA2MRU.js +12 -0
- package/dist/chunks/pt-CRTRYTDJ.js +12 -0
- package/dist/chunks/pt-PT-IZMPF3BY.js +12 -0
- package/dist/chunks/ro-FUOGHWJA.js +12 -0
- package/dist/chunks/ru-KAT4X5EC.js +12 -0
- package/dist/chunks/si-GDAXEOBK.js +12 -0
- package/dist/chunks/sk-CDSK6MY5.js +12 -0
- package/dist/chunks/sl-TFJQYNA4.js +12 -0
- package/dist/chunks/so-TXI6JJPW.js +12 -0
- package/dist/chunks/sq-KMM2QIRU.js +12 -0
- package/dist/chunks/sr-OTZNEL5Z.js +12 -0
- package/dist/chunks/sv-7CANJ6CF.js +12 -0
- package/dist/chunks/sw-5JDMTJ5K.js +12 -0
- package/dist/chunks/ta-HT4SO7PD.js +12 -0
- package/dist/chunks/te-FECCLHOI.js +12 -0
- package/dist/chunks/tg-FJWFJWF2.js +12 -0
- package/dist/chunks/th-JEP434LN.js +12 -0
- package/dist/chunks/tl-GN35ZR2F.js +12 -0
- package/dist/chunks/tr-IPVLQUE4.js +12 -0
- package/dist/chunks/uk-LHWPGFRV.js +12 -0
- package/dist/chunks/ur-7FU4XRAY.js +12 -0
- package/dist/chunks/uz-RO7XCKFE.js +12 -0
- package/dist/chunks/vi-5PHPTVV4.js +12 -0
- package/dist/chunks/zh-Hans-UM7MUEDB.js +12 -0
- package/dist/chunks/zh-Hant-7M2P4G7R.js +12 -0
- package/dist/chunks/zh-LHCPWZN2.js +12 -0
- package/dist/widgets/webwriter-geogebra-3d.js +19 -25827
- package/dist/widgets/webwriter-geogebra-classic.js +18 -25826
- package/dist/widgets/webwriter-geogebra-geometry.js +18 -25826
- package/dist/widgets/webwriter-geogebra-notes.js +18 -25826
- package/dist/widgets/webwriter-geogebra-scientific.js +18 -25826
- package/dist/widgets/webwriter-geogebra.js +20 -25830
- package/editing-config.json +839 -20
- package/lit-localize.json +73 -9
- package/localization/af.xlf +290 -0
- package/localization/am.xlf +290 -0
- package/localization/ar.xlf +271 -6
- package/localization/az.xlf +290 -0
- package/localization/be.xlf +290 -0
- package/localization/bg.xlf +271 -6
- package/localization/bn.xlf +290 -0
- package/localization/bs.xlf +290 -0
- package/localization/ca-balear.xlf +290 -0
- package/localization/ca-valencia.xlf +290 -0
- package/localization/ca.xlf +290 -0
- package/localization/cnr.xlf +290 -0
- package/localization/cs.xlf +271 -6
- package/localization/cy.xlf +290 -0
- package/localization/da.xlf +271 -6
- package/localization/de-AT.xlf +294 -0
- package/localization/de-CH.xlf +294 -0
- package/localization/de.xlf +271 -6
- package/localization/el.xlf +271 -6
- package/localization/es.xlf +271 -6
- package/localization/et.xlf +271 -6
- package/localization/eu.xlf +290 -0
- package/localization/fa.xlf +290 -0
- package/localization/fi.xlf +271 -6
- package/localization/fr.xlf +271 -6
- package/localization/ga.xlf +290 -0
- package/localization/generated/af.ts +16 -0
- package/localization/generated/am.ts +16 -0
- package/localization/generated/ar.ts +6 -12
- package/localization/generated/az.ts +16 -0
- package/localization/generated/be.ts +16 -0
- package/localization/generated/bg.ts +6 -12
- package/localization/generated/bn.ts +16 -0
- package/localization/generated/bs.ts +16 -0
- package/localization/generated/ca-balear.ts +16 -0
- package/localization/generated/ca-valencia.ts +16 -0
- package/localization/generated/ca.ts +16 -0
- package/localization/generated/cnr.ts +16 -0
- package/localization/generated/cs.ts +6 -12
- package/localization/generated/cy.ts +16 -0
- package/localization/generated/da.ts +6 -12
- package/localization/generated/de-AT.ts +16 -0
- package/localization/generated/de-CH.ts +16 -0
- package/localization/generated/de.ts +6 -11
- package/localization/generated/el.ts +6 -12
- package/localization/generated/en-AU.ts +16 -0
- package/localization/generated/en-CA.ts +16 -0
- package/localization/generated/en-GB.ts +16 -0
- package/localization/generated/en-IN.ts +16 -0
- package/localization/generated/en-US.ts +16 -0
- package/localization/generated/es.ts +6 -12
- package/localization/generated/et.ts +6 -12
- package/localization/generated/eu.ts +16 -0
- package/localization/generated/fa.ts +16 -0
- package/localization/generated/fi.ts +6 -12
- package/localization/generated/fr.ts +6 -12
- package/localization/generated/ga.ts +16 -0
- package/localization/generated/gl.ts +16 -0
- package/localization/generated/gu.ts +16 -0
- package/localization/generated/ha.ts +16 -0
- package/localization/generated/he.ts +16 -0
- package/localization/generated/hi.ts +16 -0
- package/localization/generated/hr.ts +16 -0
- package/localization/generated/hu.ts +6 -12
- package/localization/generated/hy.ts +16 -0
- package/localization/generated/id.ts +6 -12
- package/localization/generated/is.ts +16 -0
- package/localization/generated/it.ts +6 -12
- package/localization/generated/ja.ts +6 -12
- package/localization/generated/jv.ts +16 -0
- package/localization/generated/ka.ts +16 -0
- package/localization/generated/kk.ts +16 -0
- package/localization/generated/km.ts +16 -0
- package/localization/generated/kn.ts +16 -0
- package/localization/generated/ko.ts +6 -12
- package/localization/generated/ky.ts +16 -0
- package/localization/generated/la.ts +16 -0
- package/localization/generated/lb.ts +16 -0
- package/localization/generated/locale-codes.ts +211 -0
- package/localization/generated/lt.ts +6 -12
- package/localization/generated/lv.ts +6 -12
- package/localization/generated/mk.ts +16 -0
- package/localization/generated/ml.ts +16 -0
- package/localization/generated/mn.ts +16 -0
- package/localization/generated/mr.ts +16 -0
- package/localization/generated/ms.ts +16 -0
- package/localization/generated/mt.ts +16 -0
- package/localization/generated/my.ts +16 -0
- package/localization/generated/nb.ts +6 -12
- package/localization/generated/ne.ts +16 -0
- package/localization/generated/nl.ts +6 -12
- package/localization/generated/nn.ts +16 -0
- package/localization/generated/no.ts +16 -0
- package/localization/generated/or.ts +16 -0
- package/localization/generated/pa.ts +16 -0
- package/localization/generated/pl.ts +6 -12
- package/localization/generated/pt-BR.ts +6 -12
- package/localization/generated/pt-PT.ts +6 -12
- package/localization/generated/pt.ts +16 -0
- package/localization/generated/ro.ts +6 -12
- package/localization/generated/ru.ts +6 -12
- package/localization/generated/si.ts +16 -0
- package/localization/generated/sk.ts +6 -12
- package/localization/generated/sl.ts +6 -12
- package/localization/generated/so.ts +16 -0
- package/localization/generated/sq.ts +16 -0
- package/localization/generated/sr.ts +16 -0
- package/localization/generated/sv.ts +6 -12
- package/localization/generated/sw.ts +16 -0
- package/localization/generated/ta.ts +16 -0
- package/localization/generated/te.ts +16 -0
- package/localization/generated/tg.ts +16 -0
- package/localization/generated/th.ts +16 -0
- package/localization/generated/tl.ts +16 -0
- package/localization/generated/tr.ts +6 -12
- package/localization/generated/uk.ts +6 -12
- package/localization/generated/ur.ts +16 -0
- package/localization/generated/uz.ts +16 -0
- package/localization/generated/vi.ts +16 -0
- package/localization/generated/zh-Hans.ts +16 -0
- package/localization/generated/zh-Hant.ts +16 -0
- package/localization/generated/zh.ts +16 -0
- package/localization/gl.xlf +290 -0
- package/localization/gu.xlf +290 -0
- package/localization/ha.xlf +290 -0
- package/localization/he.xlf +290 -0
- package/localization/hi.xlf +290 -0
- package/localization/hr.xlf +290 -0
- package/localization/hu.xlf +271 -6
- package/localization/hy.xlf +290 -0
- package/localization/id.xlf +271 -6
- package/localization/is.xlf +290 -0
- package/localization/it.xlf +271 -6
- package/localization/ja.xlf +271 -6
- package/localization/jv.xlf +290 -0
- package/localization/ka.xlf +290 -0
- package/localization/kk.xlf +290 -0
- package/localization/km.xlf +290 -0
- package/localization/kn.xlf +290 -0
- package/localization/ko.xlf +271 -6
- package/localization/ky.xlf +290 -0
- package/localization/la.xlf +290 -0
- package/localization/lb.xlf +290 -0
- package/localization/lt.xlf +271 -6
- package/localization/lv.xlf +271 -6
- package/localization/mk.xlf +290 -0
- package/localization/ml.xlf +290 -0
- package/localization/mn.xlf +290 -0
- package/localization/mr.xlf +290 -0
- package/localization/ms.xlf +290 -0
- package/localization/mt.xlf +290 -0
- package/localization/my.xlf +290 -0
- package/localization/nb.xlf +271 -6
- package/localization/ne.xlf +290 -0
- package/localization/nl.xlf +271 -6
- package/localization/nn.xlf +290 -0
- package/localization/no.xlf +295 -0
- package/localization/or.xlf +290 -0
- package/localization/pa.xlf +290 -0
- package/localization/pl.xlf +271 -6
- package/localization/pt-BR.xlf +271 -6
- package/localization/pt-PT.xlf +271 -6
- package/localization/pt.xlf +295 -0
- package/localization/ro.xlf +271 -6
- package/localization/ru.xlf +271 -6
- package/localization/si.xlf +290 -0
- package/localization/sk.xlf +271 -6
- package/localization/sl.xlf +271 -6
- package/localization/so.xlf +290 -0
- package/localization/sq.xlf +290 -0
- package/localization/sr.xlf +290 -0
- package/localization/sv.xlf +271 -6
- package/localization/sw.xlf +290 -0
- package/localization/ta.xlf +290 -0
- package/localization/te.xlf +290 -0
- package/localization/tg.xlf +290 -0
- package/localization/th.xlf +290 -0
- package/localization/tl.xlf +290 -0
- package/localization/tr.xlf +271 -6
- package/localization/uk.xlf +271 -6
- package/localization/ur.xlf +290 -0
- package/localization/uz.xlf +290 -0
- package/localization/vi.xlf +290 -0
- package/localization/zh-Hans.xlf +295 -0
- package/localization/zh-Hant.xlf +295 -0
- package/localization/zh.xlf +295 -0
- package/package.json +194 -86
- package/src/components/geogebra-app.styles.ts +47 -0
- package/{components → src/components}/geogebra-app.ts +237 -332
- package/src/model/geogebra-api.ts +148 -0
- package/src/model/geogebra-options.ts +72 -0
- package/src/model/geogebra-parameters.ts +53 -0
- package/src/model/ggb-file.ts +30 -0
- package/src/types.d.ts +3 -0
- package/{widgets → src/widgets}/webwriter-geogebra-3d.ts +1 -1
- package/{widgets → src/widgets}/webwriter-geogebra.ts +1 -2
- package/tests/conversions.test.ts +80 -0
- package/tests/data-block.test.ts +72 -0
- package/tests/helpers.ts +48 -0
- package/tests/language.test.ts +49 -0
- package/tests/presentation.test.ts +114 -0
- package/tsconfig.json +3 -7
- package/assets/icons/file-earmark-arrow-up.svg +0 -4
- package/components/geogebra-app.styles.ts +0 -10
- package/components/geogebra-options.styles.ts +0 -37
- package/components/geogebra-options.ts +0 -187
- package/custom.d.ts +0 -180
- package/dist/widgets/webwriter-geogebra-3d.css +0 -444
- package/dist/widgets/webwriter-geogebra-classic.css +0 -444
- package/dist/widgets/webwriter-geogebra-geometry.css +0 -444
- package/dist/widgets/webwriter-geogebra-notes.css +0 -444
- package/dist/widgets/webwriter-geogebra-scientific.css +0 -444
- package/dist/widgets/webwriter-geogebra.css +0 -444
- package/localization/generated/locale-codes.js +0 -83
- package/localization/generated/zh-hans.ts +0 -20
- package/localization/generated/zh-hant.ts +0 -20
- package/localization/zh-hans.xlf +0 -30
- package/localization/zh-hant.xlf +0 -30
- package/widgets/webwriter-geogebra-evaluator.ts +0 -15
- /package/.github/workflows/{main.yml → publish.yml} +0 -0
- /package/localization/pkg/{zh-hans.xliff → zh-Hans.xliff} +0 -0
- /package/localization/pkg/{zh-hant.xliff → zh-Hant.xliff} +0 -0
- /package/localization/snippets/{zh-hans.xliff → zh-Hans.xliff} +0 -0
- /package/localization/snippets/{zh-hant.xliff → zh-Hant.xliff} +0 -0
- /package/{utils → src/model}/boolean-attribute-converter.ts +0 -0
- /package/{widgets → src/widgets}/webwriter-geogebra-classic.ts +0 -0
- /package/{widgets → src/widgets}/webwriter-geogebra-geometry.ts +0 -0
- /package/{widgets → src/widgets}/webwriter-geogebra-notes.ts +0 -0
- /package/{widgets → src/widgets}/webwriter-geogebra-scientific.ts +0 -0
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# Geogebra (`@webwriter/geogebra@
|
|
2
|
-
[License: MIT](LICENSE) | Version:
|
|
1
|
+
# Geogebra (`@webwriter/geogebra@2.0.2`)
|
|
2
|
+
[License: MIT](LICENSE) | Version: 2.0.2
|
|
3
3
|
|
|
4
4
|
Use the mathematics learning apps of GeoGebra for algebra and geometry.
|
|
5
5
|
|
|
@@ -40,9 +40,14 @@ npm install @webwriter/geogebra
|
|
|
40
40
|
| `enableFileFeatures` (`enableFileFeatures`) | `boolean` | Determines whether file saving, file loading, sign in and Options > Save settings are enabled. This argument is ignored when menubar is not showing. Default: true | `false` | ✓ |
|
|
41
41
|
| `enableUndoRedo` (`enableUndoRedo`) | `boolean` | Determines whether Undo and Redo icons are shown. This argument is ignored when toolbar is not showing. Default: true | `false` | ✓ |
|
|
42
42
|
| `ggbStyles` (`ggbStyles`) | `string` | Custom CSS styles to apply to the GeoGebra applet. | - | ✗ |
|
|
43
|
+
| `WebwriterGeogebra.options` | - | - | `geogebraOptions` | ✗ |
|
|
44
|
+
| `WebwriterGeogebra.actions` | `object` | - | `{ importConstruction: { label: (widget: {msg: MsgFn}) => ({_: widget.msg("Import construction")}), input: {type: "file" as const, accept: ".ggb", multiple: false}, }, }` | ✗ |
|
|
45
|
+
| `WebwriterGeogebra.convertFrom` | `object` | - | `{".ggb": "importGgb"}` | ✗ |
|
|
46
|
+
| `WebwriterGeogebra.convertTo` | `object` | - | `{".ggb": "exportGgb", "image/png": "exportPng", "image/svg+xml": "exportSvg"}` | ✗ |
|
|
47
|
+
| `msg` | `MsgFn` | - | - | ✗ |
|
|
43
48
|
| `width` (`width`) | `number` | Applet width | `800` | ✓ |
|
|
44
49
|
| `height` (`height`) | `number` | Applet height | `450` | ✓ |
|
|
45
|
-
| `src` (`src`) | `string` | Source of the GeoGebra file to load (base64-encoded string, material ID prefixed with "ggbid:", or file URL) | - | ✓ |
|
|
50
|
+
| `src` (`src`) | `string \| undefined` | Source of the GeoGebra file to load (base64-encoded string, material ID prefixed with "ggbid:", or file URL) | - | ✓ |
|
|
46
51
|
| `borderColor` (`borderColor`) | `string` | Color of the border line drawn around the applet panel (as hex rgb string). Default: gray | `"gray"` | ✓ |
|
|
47
52
|
| `borderRadius` (`borderRadius`) | `number` | Size of applet's border radius in pixels. | `1` | ✓ |
|
|
48
53
|
| `enableRightClick` (`enableRightClick`) | `boolean` | States whether right clicks should be handled by the applet. Setting this parameter to "false" disables context menus, properties dialogs and right-click-zooming. Default: true. NB also enables/disables some keyboard shortcuts eg Delete and Ctrl + R (recompute all objects). Default: true | `true` | ✓ |
|
|
@@ -52,24 +57,24 @@ npm install @webwriter/geogebra
|
|
|
52
57
|
| `showMenuBar` (`showMenuBar`) | `boolean` | States whether the menubar of GeoGebra should be shown in the applet. Default: false | `false` | ✓ |
|
|
53
58
|
| `showToolBar` (`showToolBar`) | `boolean` | States whether the toolbar with the construction mode buttons should be shown in the applet. Default: false | `true` | ✓ |
|
|
54
59
|
| `showToolBarHelp` (`showToolBarHelp`) | `boolean` | States whether the toolbar help text right to the toolbar buttons should be shown in the applet | `false` | ✓ |
|
|
55
|
-
| `customToolBar` (`customToolBar`) | `string` | Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, `,` adds a separator within a menu, `\|` starts a new menu and `\|\|` adds a separator in the toolbar before starting a new menu. This will override the saved toolbar from the .ggb file / base64 string. Custom tools are numbered 100 001, 100 002, etc | - | ✓ |
|
|
60
|
+
| `customToolBar` (`customToolBar`) | `string \| undefined` | Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, `,` adds a separator within a menu, `\|` starts a new menu and `\|\|` adds a separator in the toolbar before starting a new menu. This will override the saved toolbar from the .ggb file / base64 string. Custom tools are numbered 100 001, 100 002, etc | - | ✓ |
|
|
56
61
|
| `showAlgebraInput` (`showAlgebraInput`) | `boolean` | States whether the algebra input line (with input field, greek letters and command list) should be shown in the applet. Default: false | `true` | ✓ |
|
|
57
62
|
| `showResetIcon` (`showResetIcon`) | `boolean` | States whether a small icon (GeoGebra ellipse) should be shown in the upper right corner of the applet. Clicking on this icon resets the applet (i.e. it reloads the file given in the filename parameter). Default: false | `false` | ✓ |
|
|
58
|
-
| `language` (`language`) | `
|
|
59
|
-
| `country` (`country`) | `
|
|
60
|
-
| `appletId` (`appletId`) | `
|
|
63
|
+
| `language` (`language`) | `string \| undefined` | ISO language string. GeoGebra tries to set your local language automatically (if it is available among the supported languages, of course). The default language for unsupported languages is English. If you want to specify a certain language manually, please use this parameter. | - | ✓ |
|
|
64
|
+
| `country` (`country`) | `string \| undefined` | ISO country string. This parameter only makes sense if you use it together with the language parameter. | - | ✓ |
|
|
65
|
+
| `appletId` (`appletId`) | `string \| undefined` | This parameter allows you to specify the argument passed to the JavaScript function ggbOnInit(), which is called once the applet is fully initialised. This is useful when you have multiple applets on a page. | - | ✓ |
|
|
61
66
|
| `allowStyleBar` (`allowStyleBar`) | `boolean` | Determines whether the Style Bar can be shown (or will be shown if just Graphics View 1 is showing). Default: false | `false` | ✓ |
|
|
62
67
|
| `randomize` (`randomize`) | `boolean` | Determines whether random numbers should be randomized on file load. Useful when you want the app to reload in exactly the same state it was saved. Default: true | `true` | ✓ |
|
|
63
|
-
| `randomSeed` (`randomSeed`) | `number` | Specify seed for random numbers. Note that if you save a state of the app after user interacted with it and try to reload that state with the same randomSeed, you may get a different result. Use randomize for those use-cases. | - | ✓ |
|
|
68
|
+
| `randomSeed` (`randomSeed`) | `number \| undefined` | Specify seed for random numbers. Note that if you save a state of the app after user interacted with it and try to reload that state with the same randomSeed, you may get a different result. Use randomize for those use-cases. | - | ✓ |
|
|
64
69
|
| `useBrowserForJs` (`useBrowserForJs`) | `boolean` | When true, GeoGebra: runs ggbOnInit from HTML, ignores ggbOnInit from file, and ignores JS update scripts of objects in file. When false, GeoGebra: ignores ggbOnInit from HTML (use appletOnLoad parameter of GGBApplet instead), runs ggbOnInit from file, and runs JS update scripts of objects in file. Default: false | `false` | ✓ |
|
|
65
70
|
| `showLogging` (`showLogging`) | `boolean` | Determines whether logging is shown in the Browser's console. Default: false | `false` | ✓ |
|
|
66
71
|
| `capturingThreshold` (`capturingThreshold`) | `number` | Determines the sensitivity of object selection. The default value of 3 is usually fine to select and drag objects both with the mouse and touch. Use larger values (e.g. 4 or 5) to make it easier to select and drag objects. Default: 3 | `3` | ✓ |
|
|
67
|
-
| `perspective` (`perspective`) | `
|
|
68
|
-
| `enable3d` (`enable3d`) | `boolean` | Whether 3D should be enabled (for exam mode). | - | ✓ |
|
|
69
|
-
| `enableCAS` (`enableCAS`) | `boolean` | Whether CAS should be enabled (for exam mode). | - | ✓ |
|
|
70
|
-
| `algebraInputPosition` (`algebraInputPosition`) | `"algebra" \| "top" \| "bottom"` | Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty (default), the position depends on file. | - | ✓ |
|
|
72
|
+
| `perspective` (`perspective`) | `string \| undefined` | For values see SetPerspective_Command in the GeoGebra Manual. Just for a blank start ie shouldn't be used with material_id, filename or ggbBase64 parameters | - | ✓ |
|
|
73
|
+
| `enable3d` (`enable3d`) | `boolean \| undefined` | Whether 3D should be enabled (for exam mode). | - | ✓ |
|
|
74
|
+
| `enableCAS` (`enableCAS`) | `boolean \| undefined` | Whether CAS should be enabled (for exam mode). | - | ✓ |
|
|
75
|
+
| `algebraInputPosition` (`algebraInputPosition`) | `"algebra" \| "top" \| "bottom" \| undefined` | Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty (default), the position depends on file. | - | ✓ |
|
|
71
76
|
| `preventFocus` (`preventFocus`) | `boolean` | When set to true, this prevents the applet from getting focus automatically at the start. Default: false | `false` | ✓ |
|
|
72
|
-
| `scaleContainerClass` (`scaleContainerClass`) | `string` | Name of CSS class that is used as container; applet will scale to fit into the container. | - | ✓ |
|
|
77
|
+
| `scaleContainerClass` (`scaleContainerClass`) | `string \| undefined` | Name of CSS class that is used as container; applet will scale to fit into the container. | - | ✓ |
|
|
73
78
|
| `autoHeight` (`autoHeight`) | `boolean` | `true` to restrict the width of the applet and compute height automatically, add autoHeight: true. `false` if you want the applet to be restricted by both width and height of the container | `true` | ✓ |
|
|
74
79
|
| `allowUpscale` (`allowUpscale`) | `boolean` | Determines whether automatic scaling may scale the applet up. Default: false | `false` | ✓ |
|
|
75
80
|
| `playButton` (`playButton`) | `boolean` | Determines whether a preview image and a play button should be rendered in place of the applet. Pushing the play button initializes the applet. Default: false | `false` | ✓ |
|
|
@@ -77,21 +82,33 @@ npm install @webwriter/geogebra
|
|
|
77
82
|
| `showAnimationButton` (`showAnimationButton`) | `boolean` | Whether animation button should be visible | `false` | ✓ |
|
|
78
83
|
| `showSuggestionButtons` (`showSuggestionButtons`) | `boolean` | Whether suggestion buttons (special points, solve) in Algebra View should be visible | `false` | ✓ |
|
|
79
84
|
| `showStartTooltip` (`showStartTooltip`) | `boolean` | Whether "Welcome" tooltip should be shown | `false` | ✓ |
|
|
80
|
-
| `rounding` (`rounding`) | `string` | String composed of number of decimal places and flags — valid flags are "s" for significant digits and "r" for rational numbers. Hence "10" means 10 decimal places, "10s" stands for 10 significant digits. | - | ✓ |
|
|
85
|
+
| `rounding` (`rounding`) | `string \| undefined` | String composed of number of decimal places and flags — valid flags are "s" for significant digits and "r" for rational numbers. Hence "10" means 10 decimal places, "10s" stands for 10 significant digits. | - | ✓ |
|
|
81
86
|
| `buttonShadows` (`buttonShadows`) | `boolean` | Whether buttons should have shadow | `false` | ✓ |
|
|
82
|
-
| `buttonRounding` (`buttonRounding`) | `
|
|
83
|
-
| `buttonBorderColor` (`buttonBorderColor`) | `string` | Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | - | ✓ |
|
|
84
|
-
| `editorBackgroundColor` (`editorBackgroundColor`) | `string` | Background color of the evaluator app | - | ✓ |
|
|
85
|
-
| `editorForegroundColor` (`editorForegroundColor`) | `string` | Foreground (text) color of the equation editor (appname = "evaluator") | - | ✓ |
|
|
87
|
+
| `buttonRounding` (`buttonRounding`) | `number` | Relative radius of button's rounded border. The border radius in pixels is buttonRounding * height /2, where height is the height of the button. Default: 0.2 | `0.2` | ✓ |
|
|
88
|
+
| `buttonBorderColor` (`buttonBorderColor`) | `string \| undefined` | Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | - | ✓ |
|
|
89
|
+
| `editorBackgroundColor` (`editorBackgroundColor`) | `string \| undefined` | Background color of the evaluator app | - | ✓ |
|
|
90
|
+
| `editorForegroundColor` (`editorForegroundColor`) | `string \| undefined` | Foreground (text) color of the equation editor (appname = "evaluator") | - | ✓ |
|
|
86
91
|
| `textmode` (`textmode`) | `boolean` | Whether editor is in text mode or not (appname = "evaluator"). Default: false | `false` | ✓ |
|
|
87
|
-
| `showKeyboardOnFocus` (`showKeyboardOnFocus`) | `boolean` | Whether to show keyboard when input is focused. When set to true, keyboard is always shown, for false it never appears, for auto it's shown unless closed by user. Default: true in evaluator app, auto in other apps | - | ✓ |
|
|
88
|
-
| `keyboardType` (`keyboardType`) | `"scientific" \| "normal" \| "notes"` | Which keyboard is shown for equation editor (appname = "evaluator") | - | ✓ |
|
|
92
|
+
| `showKeyboardOnFocus` (`showKeyboardOnFocus`) | `boolean \| undefined` | Whether to show keyboard when input is focused. When set to true, keyboard is always shown, for false it never appears, for auto it's shown unless closed by user. Default: true in evaluator app, auto in other apps | - | ✓ |
|
|
93
|
+
| `keyboardType` (`keyboardType`) | `"scientific" \| "normal" \| "notes" \| undefined` | Which keyboard is shown for equation editor (appname = "evaluator") | - | ✓ |
|
|
89
94
|
| `transparentGraphics` (`transparentGraphics`) | `boolean` | Whether the Graphics View and Graphics View 2 should be transparent | `false` | ✓ |
|
|
90
95
|
| `disabledJavaScript` (`disabledJavaScript`) | `boolean` | Whether running JavaScript from material files is disabled or not. | `false` | ✓ |
|
|
91
|
-
| `detachedKeyboardParent` (`detachedKeyboardParent`) | `string` | When set, the keyboard should be attached to the first element in DOM that fits the selector. | - | ✓ |
|
|
96
|
+
| `detachedKeyboardParent` (`detachedKeyboardParent`) | `string \| undefined` | When set, the keyboard should be attached to the first element in DOM that fits the selector. | - | ✓ |
|
|
92
97
|
|
|
93
98
|
*Fields including [properties](https://developer.mozilla.org/en-US/docs/Glossary/Property/JavaScript) and [attributes](https://developer.mozilla.org/en-US/docs/Glossary/Attribute) define the current state of the widget and offer customization options.*
|
|
94
99
|
|
|
100
|
+
## Methods
|
|
101
|
+
| Name | Description | Parameters |
|
|
102
|
+
| :--: | :---------: | :-------: |
|
|
103
|
+
| `importConstruction` | - | `files: File[]`
|
|
104
|
+
| `importGgb` | - | `file: File`
|
|
105
|
+
| `exportGgb` | - | -
|
|
106
|
+
| `exportPng` | - | -
|
|
107
|
+
| `exportSvg` | - | -
|
|
108
|
+
| `focus` | - | `options: FocusOptions`
|
|
109
|
+
|
|
110
|
+
*[Methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions) allow programmatic access to the widget.*
|
|
111
|
+
|
|
95
112
|
## Events
|
|
96
113
|
| Name | Description |
|
|
97
114
|
| :--: | :---------: |
|
|
@@ -100,14 +117,23 @@ npm install @webwriter/geogebra
|
|
|
100
117
|
|
|
101
118
|
*[Events](https://developer.mozilla.org/en-US/docs/Web/Events) are dispatched by the widget after certain triggers.*
|
|
102
119
|
|
|
120
|
+
## CSS parts
|
|
121
|
+
| Name | Description |
|
|
122
|
+
| :--: | :---------: |
|
|
123
|
+
| applet | The iframe that holds the GeoGebra applet. |
|
|
124
|
+
|
|
125
|
+
*[CSS parts](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_shadow_parts) allow freely styling internals of the widget with CSS.*
|
|
126
|
+
|
|
103
127
|
## Editing config
|
|
104
128
|
| Name | Value |
|
|
105
129
|
| :--: | :---------: |
|
|
106
130
|
| `content` | `text*` |
|
|
131
|
+
| `importFormats` | `.ggb` |
|
|
132
|
+
| `exportFormats` | `.ggb,image/png,image/svg+xml` |
|
|
107
133
|
|
|
108
134
|
*The [editing config](https://webwriter.app/docs/packages/configuring/#editingconfig) defines how explorable authoring tools such as [WebWriter](https://webwriter.app) treat the widget.*
|
|
109
135
|
|
|
110
|
-
*No public
|
|
136
|
+
*No public slots, or custom CSS properties.*
|
|
111
137
|
|
|
112
138
|
|
|
113
139
|
## `WebwriterGeogebraGeometry` (`<webwriter-geogebra-geometry>`)
|
|
@@ -140,10 +166,15 @@ npm install @webwriter/geogebra
|
|
|
140
166
|
| `type` (`type`) | `"classic" \| "geometry" \| "3d" \| "suite" \| "evaluator" \| "scientific" \| "notes"` | app name, default: "classic". "graphing" … GeoGebra Graphing Calculator "geometry" … GeoGebra Geometry "3d" … GeoGebra 3D Graphing Calculator "classic" … GeoGebra Classic "suite" … GeoGebra Calculator Suite "evaluator" … Equation Editor "scientific" …Scientific Calculator "notes" … GeoGebra Notes | `"geometry"` | ✓ |
|
|
141
167
|
| `showZoomButtons` (`showZoomButtons`) | `boolean` | States whether the zoom in / zoom out / home buttons should be shown in the Graphics View or not. Default: false | `true` | ✓ |
|
|
142
168
|
| `showFullscreenButton` (`showFullscreenButton`) | `boolean` | Whether fullscreen button should be visible | `true` | ✓ |
|
|
169
|
+
| `WebwriterGeogebraGeometry.options` | - | - | `geogebraOptions` | ✗ |
|
|
170
|
+
| `WebwriterGeogebraGeometry.actions` | `object` | - | `{ importConstruction: { label: (widget: {msg: MsgFn}) => ({_: widget.msg("Import construction")}), input: {type: "file" as const, accept: ".ggb", multiple: false}, }, }` | ✗ |
|
|
171
|
+
| `WebwriterGeogebraGeometry.convertFrom` | `object` | - | `{".ggb": "importGgb"}` | ✗ |
|
|
172
|
+
| `WebwriterGeogebraGeometry.convertTo` | `object` | - | `{".ggb": "exportGgb", "image/png": "exportPng", "image/svg+xml": "exportSvg"}` | ✗ |
|
|
173
|
+
| `msg` | `MsgFn` | - | - | ✗ |
|
|
143
174
|
| `ggbStyles` (`ggbStyles`) | `string` | Custom CSS styles to apply to the GeoGebra applet. | - | ✗ |
|
|
144
175
|
| `width` (`width`) | `number` | Applet width | `800` | ✓ |
|
|
145
176
|
| `height` (`height`) | `number` | Applet height | `450` | ✓ |
|
|
146
|
-
| `src` (`src`) | `string` | Source of the GeoGebra file to load (base64-encoded string, material ID prefixed with "ggbid:", or file URL) | - | ✓ |
|
|
177
|
+
| `src` (`src`) | `string \| undefined` | Source of the GeoGebra file to load (base64-encoded string, material ID prefixed with "ggbid:", or file URL) | - | ✓ |
|
|
147
178
|
| `borderColor` (`borderColor`) | `string` | Color of the border line drawn around the applet panel (as hex rgb string). Default: gray | `"gray"` | ✓ |
|
|
148
179
|
| `borderRadius` (`borderRadius`) | `number` | Size of applet's border radius in pixels. | `1` | ✓ |
|
|
149
180
|
| `enableRightClick` (`enableRightClick`) | `boolean` | States whether right clicks should be handled by the applet. Setting this parameter to "false" disables context menus, properties dialogs and right-click-zooming. Default: true. NB also enables/disables some keyboard shortcuts eg Delete and Ctrl + R (recompute all objects). Default: true | `true` | ✓ |
|
|
@@ -153,26 +184,26 @@ npm install @webwriter/geogebra
|
|
|
153
184
|
| `showMenuBar` (`showMenuBar`) | `boolean` | States whether the menubar of GeoGebra should be shown in the applet. Default: false | `false` | ✓ |
|
|
154
185
|
| `showToolBar` (`showToolBar`) | `boolean` | States whether the toolbar with the construction mode buttons should be shown in the applet. Default: false | `true` | ✓ |
|
|
155
186
|
| `showToolBarHelp` (`showToolBarHelp`) | `boolean` | States whether the toolbar help text right to the toolbar buttons should be shown in the applet | `false` | ✓ |
|
|
156
|
-
| `customToolBar` (`customToolBar`) | `string` | Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, `,` adds a separator within a menu, `\|` starts a new menu and `\|\|` adds a separator in the toolbar before starting a new menu. This will override the saved toolbar from the .ggb file / base64 string. Custom tools are numbered 100 001, 100 002, etc | - | ✓ |
|
|
187
|
+
| `customToolBar` (`customToolBar`) | `string \| undefined` | Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, `,` adds a separator within a menu, `\|` starts a new menu and `\|\|` adds a separator in the toolbar before starting a new menu. This will override the saved toolbar from the .ggb file / base64 string. Custom tools are numbered 100 001, 100 002, etc | - | ✓ |
|
|
157
188
|
| `showAlgebraInput` (`showAlgebraInput`) | `boolean` | States whether the algebra input line (with input field, greek letters and command list) should be shown in the applet. Default: false | `true` | ✓ |
|
|
158
189
|
| `showResetIcon` (`showResetIcon`) | `boolean` | States whether a small icon (GeoGebra ellipse) should be shown in the upper right corner of the applet. Clicking on this icon resets the applet (i.e. it reloads the file given in the filename parameter). Default: false | `false` | ✓ |
|
|
159
|
-
| `language` (`language`) | `
|
|
160
|
-
| `country` (`country`) | `
|
|
161
|
-
| `appletId` (`appletId`) | `
|
|
190
|
+
| `language` (`language`) | `string \| undefined` | ISO language string. GeoGebra tries to set your local language automatically (if it is available among the supported languages, of course). The default language for unsupported languages is English. If you want to specify a certain language manually, please use this parameter. | - | ✓ |
|
|
191
|
+
| `country` (`country`) | `string \| undefined` | ISO country string. This parameter only makes sense if you use it together with the language parameter. | - | ✓ |
|
|
192
|
+
| `appletId` (`appletId`) | `string \| undefined` | This parameter allows you to specify the argument passed to the JavaScript function ggbOnInit(), which is called once the applet is fully initialised. This is useful when you have multiple applets on a page. | - | ✓ |
|
|
162
193
|
| `allowStyleBar` (`allowStyleBar`) | `boolean` | Determines whether the Style Bar can be shown (or will be shown if just Graphics View 1 is showing). Default: false | `false` | ✓ |
|
|
163
194
|
| `randomize` (`randomize`) | `boolean` | Determines whether random numbers should be randomized on file load. Useful when you want the app to reload in exactly the same state it was saved. Default: true | `true` | ✓ |
|
|
164
|
-
| `randomSeed` (`randomSeed`) | `number` | Specify seed for random numbers. Note that if you save a state of the app after user interacted with it and try to reload that state with the same randomSeed, you may get a different result. Use randomize for those use-cases. | - | ✓ |
|
|
195
|
+
| `randomSeed` (`randomSeed`) | `number \| undefined` | Specify seed for random numbers. Note that if you save a state of the app after user interacted with it and try to reload that state with the same randomSeed, you may get a different result. Use randomize for those use-cases. | - | ✓ |
|
|
165
196
|
| `useBrowserForJs` (`useBrowserForJs`) | `boolean` | When true, GeoGebra: runs ggbOnInit from HTML, ignores ggbOnInit from file, and ignores JS update scripts of objects in file. When false, GeoGebra: ignores ggbOnInit from HTML (use appletOnLoad parameter of GGBApplet instead), runs ggbOnInit from file, and runs JS update scripts of objects in file. Default: false | `false` | ✓ |
|
|
166
197
|
| `showLogging` (`showLogging`) | `boolean` | Determines whether logging is shown in the Browser's console. Default: false | `false` | ✓ |
|
|
167
198
|
| `capturingThreshold` (`capturingThreshold`) | `number` | Determines the sensitivity of object selection. The default value of 3 is usually fine to select and drag objects both with the mouse and touch. Use larger values (e.g. 4 or 5) to make it easier to select and drag objects. Default: 3 | `3` | ✓ |
|
|
168
199
|
| `enableFileFeatures` (`enableFileFeatures`) | `boolean` | Determines whether file saving, file loading, sign in and Options > Save settings are enabled. This argument is ignored when menubar is not showing. Default: true | `true` | ✓ |
|
|
169
200
|
| `enableUndoRedo` (`enableUndoRedo`) | `boolean` | Determines whether Undo and Redo icons are shown. This argument is ignored when toolbar is not showing. Default: true | `true` | ✓ |
|
|
170
|
-
| `perspective` (`perspective`) | `
|
|
171
|
-
| `enable3d` (`enable3d`) | `boolean` | Whether 3D should be enabled (for exam mode). | - | ✓ |
|
|
172
|
-
| `enableCAS` (`enableCAS`) | `boolean` | Whether CAS should be enabled (for exam mode). | - | ✓ |
|
|
173
|
-
| `algebraInputPosition` (`algebraInputPosition`) | `"algebra" \| "top" \| "bottom"` | Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty (default), the position depends on file. | - | ✓ |
|
|
201
|
+
| `perspective` (`perspective`) | `string \| undefined` | For values see SetPerspective_Command in the GeoGebra Manual. Just for a blank start ie shouldn't be used with material_id, filename or ggbBase64 parameters | - | ✓ |
|
|
202
|
+
| `enable3d` (`enable3d`) | `boolean \| undefined` | Whether 3D should be enabled (for exam mode). | - | ✓ |
|
|
203
|
+
| `enableCAS` (`enableCAS`) | `boolean \| undefined` | Whether CAS should be enabled (for exam mode). | - | ✓ |
|
|
204
|
+
| `algebraInputPosition` (`algebraInputPosition`) | `"algebra" \| "top" \| "bottom" \| undefined` | Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty (default), the position depends on file. | - | ✓ |
|
|
174
205
|
| `preventFocus` (`preventFocus`) | `boolean` | When set to true, this prevents the applet from getting focus automatically at the start. Default: false | `false` | ✓ |
|
|
175
|
-
| `scaleContainerClass` (`scaleContainerClass`) | `string` | Name of CSS class that is used as container; applet will scale to fit into the container. | - | ✓ |
|
|
206
|
+
| `scaleContainerClass` (`scaleContainerClass`) | `string \| undefined` | Name of CSS class that is used as container; applet will scale to fit into the container. | - | ✓ |
|
|
176
207
|
| `autoHeight` (`autoHeight`) | `boolean` | `true` to restrict the width of the applet and compute height automatically, add autoHeight: true. `false` if you want the applet to be restricted by both width and height of the container | `true` | ✓ |
|
|
177
208
|
| `allowUpscale` (`allowUpscale`) | `boolean` | Determines whether automatic scaling may scale the applet up. Default: false | `false` | ✓ |
|
|
178
209
|
| `playButton` (`playButton`) | `boolean` | Determines whether a preview image and a play button should be rendered in place of the applet. Pushing the play button initializes the applet. Default: false | `false` | ✓ |
|
|
@@ -180,21 +211,33 @@ npm install @webwriter/geogebra
|
|
|
180
211
|
| `showAnimationButton` (`showAnimationButton`) | `boolean` | Whether animation button should be visible | `false` | ✓ |
|
|
181
212
|
| `showSuggestionButtons` (`showSuggestionButtons`) | `boolean` | Whether suggestion buttons (special points, solve) in Algebra View should be visible | `false` | ✓ |
|
|
182
213
|
| `showStartTooltip` (`showStartTooltip`) | `boolean` | Whether "Welcome" tooltip should be shown | `false` | ✓ |
|
|
183
|
-
| `rounding` (`rounding`) | `string` | String composed of number of decimal places and flags — valid flags are "s" for significant digits and "r" for rational numbers. Hence "10" means 10 decimal places, "10s" stands for 10 significant digits. | - | ✓ |
|
|
214
|
+
| `rounding` (`rounding`) | `string \| undefined` | String composed of number of decimal places and flags — valid flags are "s" for significant digits and "r" for rational numbers. Hence "10" means 10 decimal places, "10s" stands for 10 significant digits. | - | ✓ |
|
|
184
215
|
| `buttonShadows` (`buttonShadows`) | `boolean` | Whether buttons should have shadow | `false` | ✓ |
|
|
185
|
-
| `buttonRounding` (`buttonRounding`) | `
|
|
186
|
-
| `buttonBorderColor` (`buttonBorderColor`) | `string` | Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | - | ✓ |
|
|
187
|
-
| `editorBackgroundColor` (`editorBackgroundColor`) | `string` | Background color of the evaluator app | - | ✓ |
|
|
188
|
-
| `editorForegroundColor` (`editorForegroundColor`) | `string` | Foreground (text) color of the equation editor (appname = "evaluator") | - | ✓ |
|
|
216
|
+
| `buttonRounding` (`buttonRounding`) | `number` | Relative radius of button's rounded border. The border radius in pixels is buttonRounding * height /2, where height is the height of the button. Default: 0.2 | `0.2` | ✓ |
|
|
217
|
+
| `buttonBorderColor` (`buttonBorderColor`) | `string \| undefined` | Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | - | ✓ |
|
|
218
|
+
| `editorBackgroundColor` (`editorBackgroundColor`) | `string \| undefined` | Background color of the evaluator app | - | ✓ |
|
|
219
|
+
| `editorForegroundColor` (`editorForegroundColor`) | `string \| undefined` | Foreground (text) color of the equation editor (appname = "evaluator") | - | ✓ |
|
|
189
220
|
| `textmode` (`textmode`) | `boolean` | Whether editor is in text mode or not (appname = "evaluator"). Default: false | `false` | ✓ |
|
|
190
|
-
| `showKeyboardOnFocus` (`showKeyboardOnFocus`) | `boolean` | Whether to show keyboard when input is focused. When set to true, keyboard is always shown, for false it never appears, for auto it's shown unless closed by user. Default: true in evaluator app, auto in other apps | - | ✓ |
|
|
191
|
-
| `keyboardType` (`keyboardType`) | `"scientific" \| "normal" \| "notes"` | Which keyboard is shown for equation editor (appname = "evaluator") | - | ✓ |
|
|
221
|
+
| `showKeyboardOnFocus` (`showKeyboardOnFocus`) | `boolean \| undefined` | Whether to show keyboard when input is focused. When set to true, keyboard is always shown, for false it never appears, for auto it's shown unless closed by user. Default: true in evaluator app, auto in other apps | - | ✓ |
|
|
222
|
+
| `keyboardType` (`keyboardType`) | `"scientific" \| "normal" \| "notes" \| undefined` | Which keyboard is shown for equation editor (appname = "evaluator") | - | ✓ |
|
|
192
223
|
| `transparentGraphics` (`transparentGraphics`) | `boolean` | Whether the Graphics View and Graphics View 2 should be transparent | `false` | ✓ |
|
|
193
224
|
| `disabledJavaScript` (`disabledJavaScript`) | `boolean` | Whether running JavaScript from material files is disabled or not. | `false` | ✓ |
|
|
194
|
-
| `detachedKeyboardParent` (`detachedKeyboardParent`) | `string` | When set, the keyboard should be attached to the first element in DOM that fits the selector. | - | ✓ |
|
|
225
|
+
| `detachedKeyboardParent` (`detachedKeyboardParent`) | `string \| undefined` | When set, the keyboard should be attached to the first element in DOM that fits the selector. | - | ✓ |
|
|
195
226
|
|
|
196
227
|
*Fields including [properties](https://developer.mozilla.org/en-US/docs/Glossary/Property/JavaScript) and [attributes](https://developer.mozilla.org/en-US/docs/Glossary/Attribute) define the current state of the widget and offer customization options.*
|
|
197
228
|
|
|
229
|
+
## Methods
|
|
230
|
+
| Name | Description | Parameters |
|
|
231
|
+
| :--: | :---------: | :-------: |
|
|
232
|
+
| `importConstruction` | - | `files: File[]`
|
|
233
|
+
| `importGgb` | - | `file: File`
|
|
234
|
+
| `exportGgb` | - | -
|
|
235
|
+
| `exportPng` | - | -
|
|
236
|
+
| `exportSvg` | - | -
|
|
237
|
+
| `focus` | - | `options: FocusOptions`
|
|
238
|
+
|
|
239
|
+
*[Methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions) allow programmatic access to the widget.*
|
|
240
|
+
|
|
198
241
|
## Events
|
|
199
242
|
| Name | Description |
|
|
200
243
|
| :--: | :---------: |
|
|
@@ -203,17 +246,26 @@ npm install @webwriter/geogebra
|
|
|
203
246
|
|
|
204
247
|
*[Events](https://developer.mozilla.org/en-US/docs/Web/Events) are dispatched by the widget after certain triggers.*
|
|
205
248
|
|
|
249
|
+
## CSS parts
|
|
250
|
+
| Name | Description |
|
|
251
|
+
| :--: | :---------: |
|
|
252
|
+
| applet | The iframe that holds the GeoGebra applet. |
|
|
253
|
+
|
|
254
|
+
*[CSS parts](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_shadow_parts) allow freely styling internals of the widget with CSS.*
|
|
255
|
+
|
|
206
256
|
## Editing config
|
|
207
257
|
| Name | Value |
|
|
208
258
|
| :--: | :---------: |
|
|
209
259
|
| `content` | `text*` |
|
|
260
|
+
| `importFormats` | `.ggb` |
|
|
261
|
+
| `exportFormats` | `.ggb,image/png,image/svg+xml` |
|
|
210
262
|
|
|
211
263
|
*The [editing config](https://webwriter.app/docs/packages/configuring/#editingconfig) defines how explorable authoring tools such as [WebWriter](https://webwriter.app) treat the widget.*
|
|
212
264
|
|
|
213
|
-
*No public
|
|
265
|
+
*No public slots, or custom CSS properties.*
|
|
214
266
|
|
|
215
267
|
|
|
216
|
-
## `
|
|
268
|
+
## `WebwriterGeogebra3d` (`<webwriter-geogebra-3d>`)
|
|
217
269
|
A GeoGebra 3D Graphing Calculator widget.
|
|
218
270
|
|
|
219
271
|
### Usage
|
|
@@ -243,10 +295,15 @@ npm install @webwriter/geogebra
|
|
|
243
295
|
| `type` (`type`) | `"classic" \| "geometry" \| "3d" \| "suite" \| "evaluator" \| "scientific" \| "notes"` | app name, default: "classic". "graphing" … GeoGebra Graphing Calculator "geometry" … GeoGebra Geometry "3d" … GeoGebra 3D Graphing Calculator "classic" … GeoGebra Classic "suite" … GeoGebra Calculator Suite "evaluator" … Equation Editor "scientific" …Scientific Calculator "notes" … GeoGebra Notes | `"3d"` | ✓ |
|
|
244
296
|
| `showZoomButtons` (`showZoomButtons`) | `boolean` | States whether the zoom in / zoom out / home buttons should be shown in the Graphics View or not. Default: false | `true` | ✓ |
|
|
245
297
|
| `showFullscreenButton` (`showFullscreenButton`) | `boolean` | Whether fullscreen button should be visible | `true` | ✓ |
|
|
298
|
+
| `WebwriterGeogebra3d.options` | - | - | `geogebraOptions` | ✗ |
|
|
299
|
+
| `WebwriterGeogebra3d.actions` | `object` | - | `{ importConstruction: { label: (widget: {msg: MsgFn}) => ({_: widget.msg("Import construction")}), input: {type: "file" as const, accept: ".ggb", multiple: false}, }, }` | ✗ |
|
|
300
|
+
| `WebwriterGeogebra3d.convertFrom` | `object` | - | `{".ggb": "importGgb"}` | ✗ |
|
|
301
|
+
| `WebwriterGeogebra3d.convertTo` | `object` | - | `{".ggb": "exportGgb", "image/png": "exportPng", "image/svg+xml": "exportSvg"}` | ✗ |
|
|
302
|
+
| `msg` | `MsgFn` | - | - | ✗ |
|
|
246
303
|
| `ggbStyles` (`ggbStyles`) | `string` | Custom CSS styles to apply to the GeoGebra applet. | - | ✗ |
|
|
247
304
|
| `width` (`width`) | `number` | Applet width | `800` | ✓ |
|
|
248
305
|
| `height` (`height`) | `number` | Applet height | `450` | ✓ |
|
|
249
|
-
| `src` (`src`) | `string` | Source of the GeoGebra file to load (base64-encoded string, material ID prefixed with "ggbid:", or file URL) | - | ✓ |
|
|
306
|
+
| `src` (`src`) | `string \| undefined` | Source of the GeoGebra file to load (base64-encoded string, material ID prefixed with "ggbid:", or file URL) | - | ✓ |
|
|
250
307
|
| `borderColor` (`borderColor`) | `string` | Color of the border line drawn around the applet panel (as hex rgb string). Default: gray | `"gray"` | ✓ |
|
|
251
308
|
| `borderRadius` (`borderRadius`) | `number` | Size of applet's border radius in pixels. | `1` | ✓ |
|
|
252
309
|
| `enableRightClick` (`enableRightClick`) | `boolean` | States whether right clicks should be handled by the applet. Setting this parameter to "false" disables context menus, properties dialogs and right-click-zooming. Default: true. NB also enables/disables some keyboard shortcuts eg Delete and Ctrl + R (recompute all objects). Default: true | `true` | ✓ |
|
|
@@ -256,26 +313,26 @@ npm install @webwriter/geogebra
|
|
|
256
313
|
| `showMenuBar` (`showMenuBar`) | `boolean` | States whether the menubar of GeoGebra should be shown in the applet. Default: false | `false` | ✓ |
|
|
257
314
|
| `showToolBar` (`showToolBar`) | `boolean` | States whether the toolbar with the construction mode buttons should be shown in the applet. Default: false | `true` | ✓ |
|
|
258
315
|
| `showToolBarHelp` (`showToolBarHelp`) | `boolean` | States whether the toolbar help text right to the toolbar buttons should be shown in the applet | `false` | ✓ |
|
|
259
|
-
| `customToolBar` (`customToolBar`) | `string` | Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, `,` adds a separator within a menu, `\|` starts a new menu and `\|\|` adds a separator in the toolbar before starting a new menu. This will override the saved toolbar from the .ggb file / base64 string. Custom tools are numbered 100 001, 100 002, etc | - | ✓ |
|
|
316
|
+
| `customToolBar` (`customToolBar`) | `string \| undefined` | Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, `,` adds a separator within a menu, `\|` starts a new menu and `\|\|` adds a separator in the toolbar before starting a new menu. This will override the saved toolbar from the .ggb file / base64 string. Custom tools are numbered 100 001, 100 002, etc | - | ✓ |
|
|
260
317
|
| `showAlgebraInput` (`showAlgebraInput`) | `boolean` | States whether the algebra input line (with input field, greek letters and command list) should be shown in the applet. Default: false | `true` | ✓ |
|
|
261
318
|
| `showResetIcon` (`showResetIcon`) | `boolean` | States whether a small icon (GeoGebra ellipse) should be shown in the upper right corner of the applet. Clicking on this icon resets the applet (i.e. it reloads the file given in the filename parameter). Default: false | `false` | ✓ |
|
|
262
|
-
| `language` (`language`) | `
|
|
263
|
-
| `country` (`country`) | `
|
|
264
|
-
| `appletId` (`appletId`) | `
|
|
319
|
+
| `language` (`language`) | `string \| undefined` | ISO language string. GeoGebra tries to set your local language automatically (if it is available among the supported languages, of course). The default language for unsupported languages is English. If you want to specify a certain language manually, please use this parameter. | - | ✓ |
|
|
320
|
+
| `country` (`country`) | `string \| undefined` | ISO country string. This parameter only makes sense if you use it together with the language parameter. | - | ✓ |
|
|
321
|
+
| `appletId` (`appletId`) | `string \| undefined` | This parameter allows you to specify the argument passed to the JavaScript function ggbOnInit(), which is called once the applet is fully initialised. This is useful when you have multiple applets on a page. | - | ✓ |
|
|
265
322
|
| `allowStyleBar` (`allowStyleBar`) | `boolean` | Determines whether the Style Bar can be shown (or will be shown if just Graphics View 1 is showing). Default: false | `false` | ✓ |
|
|
266
323
|
| `randomize` (`randomize`) | `boolean` | Determines whether random numbers should be randomized on file load. Useful when you want the app to reload in exactly the same state it was saved. Default: true | `true` | ✓ |
|
|
267
|
-
| `randomSeed` (`randomSeed`) | `number` | Specify seed for random numbers. Note that if you save a state of the app after user interacted with it and try to reload that state with the same randomSeed, you may get a different result. Use randomize for those use-cases. | - | ✓ |
|
|
324
|
+
| `randomSeed` (`randomSeed`) | `number \| undefined` | Specify seed for random numbers. Note that if you save a state of the app after user interacted with it and try to reload that state with the same randomSeed, you may get a different result. Use randomize for those use-cases. | - | ✓ |
|
|
268
325
|
| `useBrowserForJs` (`useBrowserForJs`) | `boolean` | When true, GeoGebra: runs ggbOnInit from HTML, ignores ggbOnInit from file, and ignores JS update scripts of objects in file. When false, GeoGebra: ignores ggbOnInit from HTML (use appletOnLoad parameter of GGBApplet instead), runs ggbOnInit from file, and runs JS update scripts of objects in file. Default: false | `false` | ✓ |
|
|
269
326
|
| `showLogging` (`showLogging`) | `boolean` | Determines whether logging is shown in the Browser's console. Default: false | `false` | ✓ |
|
|
270
327
|
| `capturingThreshold` (`capturingThreshold`) | `number` | Determines the sensitivity of object selection. The default value of 3 is usually fine to select and drag objects both with the mouse and touch. Use larger values (e.g. 4 or 5) to make it easier to select and drag objects. Default: 3 | `3` | ✓ |
|
|
271
328
|
| `enableFileFeatures` (`enableFileFeatures`) | `boolean` | Determines whether file saving, file loading, sign in and Options > Save settings are enabled. This argument is ignored when menubar is not showing. Default: true | `true` | ✓ |
|
|
272
329
|
| `enableUndoRedo` (`enableUndoRedo`) | `boolean` | Determines whether Undo and Redo icons are shown. This argument is ignored when toolbar is not showing. Default: true | `true` | ✓ |
|
|
273
|
-
| `perspective` (`perspective`) | `
|
|
274
|
-
| `enable3d` (`enable3d`) | `boolean` | Whether 3D should be enabled (for exam mode). | - | ✓ |
|
|
275
|
-
| `enableCAS` (`enableCAS`) | `boolean` | Whether CAS should be enabled (for exam mode). | - | ✓ |
|
|
276
|
-
| `algebraInputPosition` (`algebraInputPosition`) | `"algebra" \| "top" \| "bottom"` | Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty (default), the position depends on file. | - | ✓ |
|
|
330
|
+
| `perspective` (`perspective`) | `string \| undefined` | For values see SetPerspective_Command in the GeoGebra Manual. Just for a blank start ie shouldn't be used with material_id, filename or ggbBase64 parameters | - | ✓ |
|
|
331
|
+
| `enable3d` (`enable3d`) | `boolean \| undefined` | Whether 3D should be enabled (for exam mode). | - | ✓ |
|
|
332
|
+
| `enableCAS` (`enableCAS`) | `boolean \| undefined` | Whether CAS should be enabled (for exam mode). | - | ✓ |
|
|
333
|
+
| `algebraInputPosition` (`algebraInputPosition`) | `"algebra" \| "top" \| "bottom" \| undefined` | Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty (default), the position depends on file. | - | ✓ |
|
|
277
334
|
| `preventFocus` (`preventFocus`) | `boolean` | When set to true, this prevents the applet from getting focus automatically at the start. Default: false | `false` | ✓ |
|
|
278
|
-
| `scaleContainerClass` (`scaleContainerClass`) | `string` | Name of CSS class that is used as container; applet will scale to fit into the container. | - | ✓ |
|
|
335
|
+
| `scaleContainerClass` (`scaleContainerClass`) | `string \| undefined` | Name of CSS class that is used as container; applet will scale to fit into the container. | - | ✓ |
|
|
279
336
|
| `autoHeight` (`autoHeight`) | `boolean` | `true` to restrict the width of the applet and compute height automatically, add autoHeight: true. `false` if you want the applet to be restricted by both width and height of the container | `true` | ✓ |
|
|
280
337
|
| `allowUpscale` (`allowUpscale`) | `boolean` | Determines whether automatic scaling may scale the applet up. Default: false | `false` | ✓ |
|
|
281
338
|
| `playButton` (`playButton`) | `boolean` | Determines whether a preview image and a play button should be rendered in place of the applet. Pushing the play button initializes the applet. Default: false | `false` | ✓ |
|
|
@@ -283,21 +340,33 @@ npm install @webwriter/geogebra
|
|
|
283
340
|
| `showAnimationButton` (`showAnimationButton`) | `boolean` | Whether animation button should be visible | `false` | ✓ |
|
|
284
341
|
| `showSuggestionButtons` (`showSuggestionButtons`) | `boolean` | Whether suggestion buttons (special points, solve) in Algebra View should be visible | `false` | ✓ |
|
|
285
342
|
| `showStartTooltip` (`showStartTooltip`) | `boolean` | Whether "Welcome" tooltip should be shown | `false` | ✓ |
|
|
286
|
-
| `rounding` (`rounding`) | `string` | String composed of number of decimal places and flags — valid flags are "s" for significant digits and "r" for rational numbers. Hence "10" means 10 decimal places, "10s" stands for 10 significant digits. | - | ✓ |
|
|
343
|
+
| `rounding` (`rounding`) | `string \| undefined` | String composed of number of decimal places and flags — valid flags are "s" for significant digits and "r" for rational numbers. Hence "10" means 10 decimal places, "10s" stands for 10 significant digits. | - | ✓ |
|
|
287
344
|
| `buttonShadows` (`buttonShadows`) | `boolean` | Whether buttons should have shadow | `false` | ✓ |
|
|
288
|
-
| `buttonRounding` (`buttonRounding`) | `
|
|
289
|
-
| `buttonBorderColor` (`buttonBorderColor`) | `string` | Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | - | ✓ |
|
|
290
|
-
| `editorBackgroundColor` (`editorBackgroundColor`) | `string` | Background color of the evaluator app | - | ✓ |
|
|
291
|
-
| `editorForegroundColor` (`editorForegroundColor`) | `string` | Foreground (text) color of the equation editor (appname = "evaluator") | - | ✓ |
|
|
345
|
+
| `buttonRounding` (`buttonRounding`) | `number` | Relative radius of button's rounded border. The border radius in pixels is buttonRounding * height /2, where height is the height of the button. Default: 0.2 | `0.2` | ✓ |
|
|
346
|
+
| `buttonBorderColor` (`buttonBorderColor`) | `string \| undefined` | Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | - | ✓ |
|
|
347
|
+
| `editorBackgroundColor` (`editorBackgroundColor`) | `string \| undefined` | Background color of the evaluator app | - | ✓ |
|
|
348
|
+
| `editorForegroundColor` (`editorForegroundColor`) | `string \| undefined` | Foreground (text) color of the equation editor (appname = "evaluator") | - | ✓ |
|
|
292
349
|
| `textmode` (`textmode`) | `boolean` | Whether editor is in text mode or not (appname = "evaluator"). Default: false | `false` | ✓ |
|
|
293
|
-
| `showKeyboardOnFocus` (`showKeyboardOnFocus`) | `boolean` | Whether to show keyboard when input is focused. When set to true, keyboard is always shown, for false it never appears, for auto it's shown unless closed by user. Default: true in evaluator app, auto in other apps | - | ✓ |
|
|
294
|
-
| `keyboardType` (`keyboardType`) | `"scientific" \| "normal" \| "notes"` | Which keyboard is shown for equation editor (appname = "evaluator") | - | ✓ |
|
|
350
|
+
| `showKeyboardOnFocus` (`showKeyboardOnFocus`) | `boolean \| undefined` | Whether to show keyboard when input is focused. When set to true, keyboard is always shown, for false it never appears, for auto it's shown unless closed by user. Default: true in evaluator app, auto in other apps | - | ✓ |
|
|
351
|
+
| `keyboardType` (`keyboardType`) | `"scientific" \| "normal" \| "notes" \| undefined` | Which keyboard is shown for equation editor (appname = "evaluator") | - | ✓ |
|
|
295
352
|
| `transparentGraphics` (`transparentGraphics`) | `boolean` | Whether the Graphics View and Graphics View 2 should be transparent | `false` | ✓ |
|
|
296
353
|
| `disabledJavaScript` (`disabledJavaScript`) | `boolean` | Whether running JavaScript from material files is disabled or not. | `false` | ✓ |
|
|
297
|
-
| `detachedKeyboardParent` (`detachedKeyboardParent`) | `string` | When set, the keyboard should be attached to the first element in DOM that fits the selector. | - | ✓ |
|
|
354
|
+
| `detachedKeyboardParent` (`detachedKeyboardParent`) | `string \| undefined` | When set, the keyboard should be attached to the first element in DOM that fits the selector. | - | ✓ |
|
|
298
355
|
|
|
299
356
|
*Fields including [properties](https://developer.mozilla.org/en-US/docs/Glossary/Property/JavaScript) and [attributes](https://developer.mozilla.org/en-US/docs/Glossary/Attribute) define the current state of the widget and offer customization options.*
|
|
300
357
|
|
|
358
|
+
## Methods
|
|
359
|
+
| Name | Description | Parameters |
|
|
360
|
+
| :--: | :---------: | :-------: |
|
|
361
|
+
| `importConstruction` | - | `files: File[]`
|
|
362
|
+
| `importGgb` | - | `file: File`
|
|
363
|
+
| `exportGgb` | - | -
|
|
364
|
+
| `exportPng` | - | -
|
|
365
|
+
| `exportSvg` | - | -
|
|
366
|
+
| `focus` | - | `options: FocusOptions`
|
|
367
|
+
|
|
368
|
+
*[Methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions) allow programmatic access to the widget.*
|
|
369
|
+
|
|
301
370
|
## Events
|
|
302
371
|
| Name | Description |
|
|
303
372
|
| :--: | :---------: |
|
|
@@ -306,14 +375,23 @@ npm install @webwriter/geogebra
|
|
|
306
375
|
|
|
307
376
|
*[Events](https://developer.mozilla.org/en-US/docs/Web/Events) are dispatched by the widget after certain triggers.*
|
|
308
377
|
|
|
378
|
+
## CSS parts
|
|
379
|
+
| Name | Description |
|
|
380
|
+
| :--: | :---------: |
|
|
381
|
+
| applet | The iframe that holds the GeoGebra applet. |
|
|
382
|
+
|
|
383
|
+
*[CSS parts](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_shadow_parts) allow freely styling internals of the widget with CSS.*
|
|
384
|
+
|
|
309
385
|
## Editing config
|
|
310
386
|
| Name | Value |
|
|
311
387
|
| :--: | :---------: |
|
|
312
388
|
| `content` | `text*` |
|
|
389
|
+
| `importFormats` | `.ggb` |
|
|
390
|
+
| `exportFormats` | `.ggb,image/png,image/svg+xml` |
|
|
313
391
|
|
|
314
392
|
*The [editing config](https://webwriter.app/docs/packages/configuring/#editingconfig) defines how explorable authoring tools such as [WebWriter](https://webwriter.app) treat the widget.*
|
|
315
393
|
|
|
316
|
-
*No public
|
|
394
|
+
*No public slots, or custom CSS properties.*
|
|
317
395
|
|
|
318
396
|
|
|
319
397
|
## `WebwriterGeogebraNotes` (`<webwriter-geogebra-notes>`)
|
|
@@ -346,10 +424,15 @@ npm install @webwriter/geogebra
|
|
|
346
424
|
| `type` (`type`) | `"classic" \| "geometry" \| "3d" \| "suite" \| "evaluator" \| "scientific" \| "notes"` | app name, default: "classic". "graphing" … GeoGebra Graphing Calculator "geometry" … GeoGebra Geometry "3d" … GeoGebra 3D Graphing Calculator "classic" … GeoGebra Classic "suite" … GeoGebra Calculator Suite "evaluator" … Equation Editor "scientific" …Scientific Calculator "notes" … GeoGebra Notes | `"notes"` | ✓ |
|
|
347
425
|
| `showZoomButtons` (`showZoomButtons`) | `boolean` | States whether the zoom in / zoom out / home buttons should be shown in the Graphics View or not. Default: false | `true` | ✓ |
|
|
348
426
|
| `showFullscreenButton` (`showFullscreenButton`) | `boolean` | Whether fullscreen button should be visible | `true` | ✓ |
|
|
427
|
+
| `WebwriterGeogebraNotes.options` | - | - | `geogebraOptions` | ✗ |
|
|
428
|
+
| `WebwriterGeogebraNotes.actions` | `object` | - | `{ importConstruction: { label: (widget: {msg: MsgFn}) => ({_: widget.msg("Import construction")}), input: {type: "file" as const, accept: ".ggb", multiple: false}, }, }` | ✗ |
|
|
429
|
+
| `WebwriterGeogebraNotes.convertFrom` | `object` | - | `{".ggb": "importGgb"}` | ✗ |
|
|
430
|
+
| `WebwriterGeogebraNotes.convertTo` | `object` | - | `{".ggb": "exportGgb", "image/png": "exportPng", "image/svg+xml": "exportSvg"}` | ✗ |
|
|
431
|
+
| `msg` | `MsgFn` | - | - | ✗ |
|
|
349
432
|
| `ggbStyles` (`ggbStyles`) | `string` | Custom CSS styles to apply to the GeoGebra applet. | - | ✗ |
|
|
350
433
|
| `width` (`width`) | `number` | Applet width | `800` | ✓ |
|
|
351
434
|
| `height` (`height`) | `number` | Applet height | `450` | ✓ |
|
|
352
|
-
| `src` (`src`) | `string` | Source of the GeoGebra file to load (base64-encoded string, material ID prefixed with "ggbid:", or file URL) | - | ✓ |
|
|
435
|
+
| `src` (`src`) | `string \| undefined` | Source of the GeoGebra file to load (base64-encoded string, material ID prefixed with "ggbid:", or file URL) | - | ✓ |
|
|
353
436
|
| `borderColor` (`borderColor`) | `string` | Color of the border line drawn around the applet panel (as hex rgb string). Default: gray | `"gray"` | ✓ |
|
|
354
437
|
| `borderRadius` (`borderRadius`) | `number` | Size of applet's border radius in pixels. | `1` | ✓ |
|
|
355
438
|
| `enableRightClick` (`enableRightClick`) | `boolean` | States whether right clicks should be handled by the applet. Setting this parameter to "false" disables context menus, properties dialogs and right-click-zooming. Default: true. NB also enables/disables some keyboard shortcuts eg Delete and Ctrl + R (recompute all objects). Default: true | `true` | ✓ |
|
|
@@ -359,26 +442,26 @@ npm install @webwriter/geogebra
|
|
|
359
442
|
| `showMenuBar` (`showMenuBar`) | `boolean` | States whether the menubar of GeoGebra should be shown in the applet. Default: false | `false` | ✓ |
|
|
360
443
|
| `showToolBar` (`showToolBar`) | `boolean` | States whether the toolbar with the construction mode buttons should be shown in the applet. Default: false | `true` | ✓ |
|
|
361
444
|
| `showToolBarHelp` (`showToolBarHelp`) | `boolean` | States whether the toolbar help text right to the toolbar buttons should be shown in the applet | `false` | ✓ |
|
|
362
|
-
| `customToolBar` (`customToolBar`) | `string` | Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, `,` adds a separator within a menu, `\|` starts a new menu and `\|\|` adds a separator in the toolbar before starting a new menu. This will override the saved toolbar from the .ggb file / base64 string. Custom tools are numbered 100 001, 100 002, etc | - | ✓ |
|
|
445
|
+
| `customToolBar` (`customToolBar`) | `string \| undefined` | Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, `,` adds a separator within a menu, `\|` starts a new menu and `\|\|` adds a separator in the toolbar before starting a new menu. This will override the saved toolbar from the .ggb file / base64 string. Custom tools are numbered 100 001, 100 002, etc | - | ✓ |
|
|
363
446
|
| `showAlgebraInput` (`showAlgebraInput`) | `boolean` | States whether the algebra input line (with input field, greek letters and command list) should be shown in the applet. Default: false | `true` | ✓ |
|
|
364
447
|
| `showResetIcon` (`showResetIcon`) | `boolean` | States whether a small icon (GeoGebra ellipse) should be shown in the upper right corner of the applet. Clicking on this icon resets the applet (i.e. it reloads the file given in the filename parameter). Default: false | `false` | ✓ |
|
|
365
|
-
| `language` (`language`) | `
|
|
366
|
-
| `country` (`country`) | `
|
|
367
|
-
| `appletId` (`appletId`) | `
|
|
448
|
+
| `language` (`language`) | `string \| undefined` | ISO language string. GeoGebra tries to set your local language automatically (if it is available among the supported languages, of course). The default language for unsupported languages is English. If you want to specify a certain language manually, please use this parameter. | - | ✓ |
|
|
449
|
+
| `country` (`country`) | `string \| undefined` | ISO country string. This parameter only makes sense if you use it together with the language parameter. | - | ✓ |
|
|
450
|
+
| `appletId` (`appletId`) | `string \| undefined` | This parameter allows you to specify the argument passed to the JavaScript function ggbOnInit(), which is called once the applet is fully initialised. This is useful when you have multiple applets on a page. | - | ✓ |
|
|
368
451
|
| `allowStyleBar` (`allowStyleBar`) | `boolean` | Determines whether the Style Bar can be shown (or will be shown if just Graphics View 1 is showing). Default: false | `false` | ✓ |
|
|
369
452
|
| `randomize` (`randomize`) | `boolean` | Determines whether random numbers should be randomized on file load. Useful when you want the app to reload in exactly the same state it was saved. Default: true | `true` | ✓ |
|
|
370
|
-
| `randomSeed` (`randomSeed`) | `number` | Specify seed for random numbers. Note that if you save a state of the app after user interacted with it and try to reload that state with the same randomSeed, you may get a different result. Use randomize for those use-cases. | - | ✓ |
|
|
453
|
+
| `randomSeed` (`randomSeed`) | `number \| undefined` | Specify seed for random numbers. Note that if you save a state of the app after user interacted with it and try to reload that state with the same randomSeed, you may get a different result. Use randomize for those use-cases. | - | ✓ |
|
|
371
454
|
| `useBrowserForJs` (`useBrowserForJs`) | `boolean` | When true, GeoGebra: runs ggbOnInit from HTML, ignores ggbOnInit from file, and ignores JS update scripts of objects in file. When false, GeoGebra: ignores ggbOnInit from HTML (use appletOnLoad parameter of GGBApplet instead), runs ggbOnInit from file, and runs JS update scripts of objects in file. Default: false | `false` | ✓ |
|
|
372
455
|
| `showLogging` (`showLogging`) | `boolean` | Determines whether logging is shown in the Browser's console. Default: false | `false` | ✓ |
|
|
373
456
|
| `capturingThreshold` (`capturingThreshold`) | `number` | Determines the sensitivity of object selection. The default value of 3 is usually fine to select and drag objects both with the mouse and touch. Use larger values (e.g. 4 or 5) to make it easier to select and drag objects. Default: 3 | `3` | ✓ |
|
|
374
457
|
| `enableFileFeatures` (`enableFileFeatures`) | `boolean` | Determines whether file saving, file loading, sign in and Options > Save settings are enabled. This argument is ignored when menubar is not showing. Default: true | `true` | ✓ |
|
|
375
458
|
| `enableUndoRedo` (`enableUndoRedo`) | `boolean` | Determines whether Undo and Redo icons are shown. This argument is ignored when toolbar is not showing. Default: true | `true` | ✓ |
|
|
376
|
-
| `perspective` (`perspective`) | `
|
|
377
|
-
| `enable3d` (`enable3d`) | `boolean` | Whether 3D should be enabled (for exam mode). | - | ✓ |
|
|
378
|
-
| `enableCAS` (`enableCAS`) | `boolean` | Whether CAS should be enabled (for exam mode). | - | ✓ |
|
|
379
|
-
| `algebraInputPosition` (`algebraInputPosition`) | `"algebra" \| "top" \| "bottom"` | Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty (default), the position depends on file. | - | ✓ |
|
|
459
|
+
| `perspective` (`perspective`) | `string \| undefined` | For values see SetPerspective_Command in the GeoGebra Manual. Just for a blank start ie shouldn't be used with material_id, filename or ggbBase64 parameters | - | ✓ |
|
|
460
|
+
| `enable3d` (`enable3d`) | `boolean \| undefined` | Whether 3D should be enabled (for exam mode). | - | ✓ |
|
|
461
|
+
| `enableCAS` (`enableCAS`) | `boolean \| undefined` | Whether CAS should be enabled (for exam mode). | - | ✓ |
|
|
462
|
+
| `algebraInputPosition` (`algebraInputPosition`) | `"algebra" \| "top" \| "bottom" \| undefined` | Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty (default), the position depends on file. | - | ✓ |
|
|
380
463
|
| `preventFocus` (`preventFocus`) | `boolean` | When set to true, this prevents the applet from getting focus automatically at the start. Default: false | `false` | ✓ |
|
|
381
|
-
| `scaleContainerClass` (`scaleContainerClass`) | `string` | Name of CSS class that is used as container; applet will scale to fit into the container. | - | ✓ |
|
|
464
|
+
| `scaleContainerClass` (`scaleContainerClass`) | `string \| undefined` | Name of CSS class that is used as container; applet will scale to fit into the container. | - | ✓ |
|
|
382
465
|
| `autoHeight` (`autoHeight`) | `boolean` | `true` to restrict the width of the applet and compute height automatically, add autoHeight: true. `false` if you want the applet to be restricted by both width and height of the container | `true` | ✓ |
|
|
383
466
|
| `allowUpscale` (`allowUpscale`) | `boolean` | Determines whether automatic scaling may scale the applet up. Default: false | `false` | ✓ |
|
|
384
467
|
| `playButton` (`playButton`) | `boolean` | Determines whether a preview image and a play button should be rendered in place of the applet. Pushing the play button initializes the applet. Default: false | `false` | ✓ |
|
|
@@ -386,21 +469,33 @@ npm install @webwriter/geogebra
|
|
|
386
469
|
| `showAnimationButton` (`showAnimationButton`) | `boolean` | Whether animation button should be visible | `false` | ✓ |
|
|
387
470
|
| `showSuggestionButtons` (`showSuggestionButtons`) | `boolean` | Whether suggestion buttons (special points, solve) in Algebra View should be visible | `false` | ✓ |
|
|
388
471
|
| `showStartTooltip` (`showStartTooltip`) | `boolean` | Whether "Welcome" tooltip should be shown | `false` | ✓ |
|
|
389
|
-
| `rounding` (`rounding`) | `string` | String composed of number of decimal places and flags — valid flags are "s" for significant digits and "r" for rational numbers. Hence "10" means 10 decimal places, "10s" stands for 10 significant digits. | - | ✓ |
|
|
472
|
+
| `rounding` (`rounding`) | `string \| undefined` | String composed of number of decimal places and flags — valid flags are "s" for significant digits and "r" for rational numbers. Hence "10" means 10 decimal places, "10s" stands for 10 significant digits. | - | ✓ |
|
|
390
473
|
| `buttonShadows` (`buttonShadows`) | `boolean` | Whether buttons should have shadow | `false` | ✓ |
|
|
391
|
-
| `buttonRounding` (`buttonRounding`) | `
|
|
392
|
-
| `buttonBorderColor` (`buttonBorderColor`) | `string` | Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | - | ✓ |
|
|
393
|
-
| `editorBackgroundColor` (`editorBackgroundColor`) | `string` | Background color of the evaluator app | - | ✓ |
|
|
394
|
-
| `editorForegroundColor` (`editorForegroundColor`) | `string` | Foreground (text) color of the equation editor (appname = "evaluator") | - | ✓ |
|
|
474
|
+
| `buttonRounding` (`buttonRounding`) | `number` | Relative radius of button's rounded border. The border radius in pixels is buttonRounding * height /2, where height is the height of the button. Default: 0.2 | `0.2` | ✓ |
|
|
475
|
+
| `buttonBorderColor` (`buttonBorderColor`) | `string \| undefined` | Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | - | ✓ |
|
|
476
|
+
| `editorBackgroundColor` (`editorBackgroundColor`) | `string \| undefined` | Background color of the evaluator app | - | ✓ |
|
|
477
|
+
| `editorForegroundColor` (`editorForegroundColor`) | `string \| undefined` | Foreground (text) color of the equation editor (appname = "evaluator") | - | ✓ |
|
|
395
478
|
| `textmode` (`textmode`) | `boolean` | Whether editor is in text mode or not (appname = "evaluator"). Default: false | `false` | ✓ |
|
|
396
|
-
| `showKeyboardOnFocus` (`showKeyboardOnFocus`) | `boolean` | Whether to show keyboard when input is focused. When set to true, keyboard is always shown, for false it never appears, for auto it's shown unless closed by user. Default: true in evaluator app, auto in other apps | - | ✓ |
|
|
397
|
-
| `keyboardType` (`keyboardType`) | `"scientific" \| "normal" \| "notes"` | Which keyboard is shown for equation editor (appname = "evaluator") | - | ✓ |
|
|
479
|
+
| `showKeyboardOnFocus` (`showKeyboardOnFocus`) | `boolean \| undefined` | Whether to show keyboard when input is focused. When set to true, keyboard is always shown, for false it never appears, for auto it's shown unless closed by user. Default: true in evaluator app, auto in other apps | - | ✓ |
|
|
480
|
+
| `keyboardType` (`keyboardType`) | `"scientific" \| "normal" \| "notes" \| undefined` | Which keyboard is shown for equation editor (appname = "evaluator") | - | ✓ |
|
|
398
481
|
| `transparentGraphics` (`transparentGraphics`) | `boolean` | Whether the Graphics View and Graphics View 2 should be transparent | `false` | ✓ |
|
|
399
482
|
| `disabledJavaScript` (`disabledJavaScript`) | `boolean` | Whether running JavaScript from material files is disabled or not. | `false` | ✓ |
|
|
400
|
-
| `detachedKeyboardParent` (`detachedKeyboardParent`) | `string` | When set, the keyboard should be attached to the first element in DOM that fits the selector. | - | ✓ |
|
|
483
|
+
| `detachedKeyboardParent` (`detachedKeyboardParent`) | `string \| undefined` | When set, the keyboard should be attached to the first element in DOM that fits the selector. | - | ✓ |
|
|
401
484
|
|
|
402
485
|
*Fields including [properties](https://developer.mozilla.org/en-US/docs/Glossary/Property/JavaScript) and [attributes](https://developer.mozilla.org/en-US/docs/Glossary/Attribute) define the current state of the widget and offer customization options.*
|
|
403
486
|
|
|
487
|
+
## Methods
|
|
488
|
+
| Name | Description | Parameters |
|
|
489
|
+
| :--: | :---------: | :-------: |
|
|
490
|
+
| `importConstruction` | - | `files: File[]`
|
|
491
|
+
| `importGgb` | - | `file: File`
|
|
492
|
+
| `exportGgb` | - | -
|
|
493
|
+
| `exportPng` | - | -
|
|
494
|
+
| `exportSvg` | - | -
|
|
495
|
+
| `focus` | - | `options: FocusOptions`
|
|
496
|
+
|
|
497
|
+
*[Methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions) allow programmatic access to the widget.*
|
|
498
|
+
|
|
404
499
|
## Events
|
|
405
500
|
| Name | Description |
|
|
406
501
|
| :--: | :---------: |
|
|
@@ -409,14 +504,23 @@ npm install @webwriter/geogebra
|
|
|
409
504
|
|
|
410
505
|
*[Events](https://developer.mozilla.org/en-US/docs/Web/Events) are dispatched by the widget after certain triggers.*
|
|
411
506
|
|
|
507
|
+
## CSS parts
|
|
508
|
+
| Name | Description |
|
|
509
|
+
| :--: | :---------: |
|
|
510
|
+
| applet | The iframe that holds the GeoGebra applet. |
|
|
511
|
+
|
|
512
|
+
*[CSS parts](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_shadow_parts) allow freely styling internals of the widget with CSS.*
|
|
513
|
+
|
|
412
514
|
## Editing config
|
|
413
515
|
| Name | Value |
|
|
414
516
|
| :--: | :---------: |
|
|
415
517
|
| `content` | `text*` |
|
|
518
|
+
| `importFormats` | `.ggb` |
|
|
519
|
+
| `exportFormats` | `.ggb,image/png,image/svg+xml` |
|
|
416
520
|
|
|
417
521
|
*The [editing config](https://webwriter.app/docs/packages/configuring/#editingconfig) defines how explorable authoring tools such as [WebWriter](https://webwriter.app) treat the widget.*
|
|
418
522
|
|
|
419
|
-
*No public
|
|
523
|
+
*No public slots, or custom CSS properties.*
|
|
420
524
|
|
|
421
525
|
|
|
422
526
|
## `WebwriterGeogebraScientific` (`<webwriter-geogebra-scientific>`)
|
|
@@ -449,10 +553,15 @@ npm install @webwriter/geogebra
|
|
|
449
553
|
| `type` (`type`) | `"classic" \| "geometry" \| "3d" \| "suite" \| "evaluator" \| "scientific" \| "notes"` | app name, default: "classic". "graphing" … GeoGebra Graphing Calculator "geometry" … GeoGebra Geometry "3d" … GeoGebra 3D Graphing Calculator "classic" … GeoGebra Classic "suite" … GeoGebra Calculator Suite "evaluator" … Equation Editor "scientific" …Scientific Calculator "notes" … GeoGebra Notes | `"scientific"` | ✓ |
|
|
450
554
|
| `showZoomButtons` (`showZoomButtons`) | `boolean` | States whether the zoom in / zoom out / home buttons should be shown in the Graphics View or not. Default: false | `true` | ✓ |
|
|
451
555
|
| `showFullscreenButton` (`showFullscreenButton`) | `boolean` | Whether fullscreen button should be visible | `true` | ✓ |
|
|
556
|
+
| `WebwriterGeogebraScientific.options` | - | - | `geogebraOptions` | ✗ |
|
|
557
|
+
| `WebwriterGeogebraScientific.actions` | `object` | - | `{ importConstruction: { label: (widget: {msg: MsgFn}) => ({_: widget.msg("Import construction")}), input: {type: "file" as const, accept: ".ggb", multiple: false}, }, }` | ✗ |
|
|
558
|
+
| `WebwriterGeogebraScientific.convertFrom` | `object` | - | `{".ggb": "importGgb"}` | ✗ |
|
|
559
|
+
| `WebwriterGeogebraScientific.convertTo` | `object` | - | `{".ggb": "exportGgb", "image/png": "exportPng", "image/svg+xml": "exportSvg"}` | ✗ |
|
|
560
|
+
| `msg` | `MsgFn` | - | - | ✗ |
|
|
452
561
|
| `ggbStyles` (`ggbStyles`) | `string` | Custom CSS styles to apply to the GeoGebra applet. | - | ✗ |
|
|
453
562
|
| `width` (`width`) | `number` | Applet width | `800` | ✓ |
|
|
454
563
|
| `height` (`height`) | `number` | Applet height | `450` | ✓ |
|
|
455
|
-
| `src` (`src`) | `string` | Source of the GeoGebra file to load (base64-encoded string, material ID prefixed with "ggbid:", or file URL) | - | ✓ |
|
|
564
|
+
| `src` (`src`) | `string \| undefined` | Source of the GeoGebra file to load (base64-encoded string, material ID prefixed with "ggbid:", or file URL) | - | ✓ |
|
|
456
565
|
| `borderColor` (`borderColor`) | `string` | Color of the border line drawn around the applet panel (as hex rgb string). Default: gray | `"gray"` | ✓ |
|
|
457
566
|
| `borderRadius` (`borderRadius`) | `number` | Size of applet's border radius in pixels. | `1` | ✓ |
|
|
458
567
|
| `enableRightClick` (`enableRightClick`) | `boolean` | States whether right clicks should be handled by the applet. Setting this parameter to "false" disables context menus, properties dialogs and right-click-zooming. Default: true. NB also enables/disables some keyboard shortcuts eg Delete and Ctrl + R (recompute all objects). Default: true | `true` | ✓ |
|
|
@@ -462,26 +571,26 @@ npm install @webwriter/geogebra
|
|
|
462
571
|
| `showMenuBar` (`showMenuBar`) | `boolean` | States whether the menubar of GeoGebra should be shown in the applet. Default: false | `false` | ✓ |
|
|
463
572
|
| `showToolBar` (`showToolBar`) | `boolean` | States whether the toolbar with the construction mode buttons should be shown in the applet. Default: false | `true` | ✓ |
|
|
464
573
|
| `showToolBarHelp` (`showToolBarHelp`) | `boolean` | States whether the toolbar help text right to the toolbar buttons should be shown in the applet | `false` | ✓ |
|
|
465
|
-
| `customToolBar` (`customToolBar`) | `string` | Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, `,` adds a separator within a menu, `\|` starts a new menu and `\|\|` adds a separator in the toolbar before starting a new menu. This will override the saved toolbar from the .ggb file / base64 string. Custom tools are numbered 100 001, 100 002, etc | - | ✓ |
|
|
574
|
+
| `customToolBar` (`customToolBar`) | `string \| undefined` | Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, `,` adds a separator within a menu, `\|` starts a new menu and `\|\|` adds a separator in the toolbar before starting a new menu. This will override the saved toolbar from the .ggb file / base64 string. Custom tools are numbered 100 001, 100 002, etc | - | ✓ |
|
|
466
575
|
| `showAlgebraInput` (`showAlgebraInput`) | `boolean` | States whether the algebra input line (with input field, greek letters and command list) should be shown in the applet. Default: false | `true` | ✓ |
|
|
467
576
|
| `showResetIcon` (`showResetIcon`) | `boolean` | States whether a small icon (GeoGebra ellipse) should be shown in the upper right corner of the applet. Clicking on this icon resets the applet (i.e. it reloads the file given in the filename parameter). Default: false | `false` | ✓ |
|
|
468
|
-
| `language` (`language`) | `
|
|
469
|
-
| `country` (`country`) | `
|
|
470
|
-
| `appletId` (`appletId`) | `
|
|
577
|
+
| `language` (`language`) | `string \| undefined` | ISO language string. GeoGebra tries to set your local language automatically (if it is available among the supported languages, of course). The default language for unsupported languages is English. If you want to specify a certain language manually, please use this parameter. | - | ✓ |
|
|
578
|
+
| `country` (`country`) | `string \| undefined` | ISO country string. This parameter only makes sense if you use it together with the language parameter. | - | ✓ |
|
|
579
|
+
| `appletId` (`appletId`) | `string \| undefined` | This parameter allows you to specify the argument passed to the JavaScript function ggbOnInit(), which is called once the applet is fully initialised. This is useful when you have multiple applets on a page. | - | ✓ |
|
|
471
580
|
| `allowStyleBar` (`allowStyleBar`) | `boolean` | Determines whether the Style Bar can be shown (or will be shown if just Graphics View 1 is showing). Default: false | `false` | ✓ |
|
|
472
581
|
| `randomize` (`randomize`) | `boolean` | Determines whether random numbers should be randomized on file load. Useful when you want the app to reload in exactly the same state it was saved. Default: true | `true` | ✓ |
|
|
473
|
-
| `randomSeed` (`randomSeed`) | `number` | Specify seed for random numbers. Note that if you save a state of the app after user interacted with it and try to reload that state with the same randomSeed, you may get a different result. Use randomize for those use-cases. | - | ✓ |
|
|
582
|
+
| `randomSeed` (`randomSeed`) | `number \| undefined` | Specify seed for random numbers. Note that if you save a state of the app after user interacted with it and try to reload that state with the same randomSeed, you may get a different result. Use randomize for those use-cases. | - | ✓ |
|
|
474
583
|
| `useBrowserForJs` (`useBrowserForJs`) | `boolean` | When true, GeoGebra: runs ggbOnInit from HTML, ignores ggbOnInit from file, and ignores JS update scripts of objects in file. When false, GeoGebra: ignores ggbOnInit from HTML (use appletOnLoad parameter of GGBApplet instead), runs ggbOnInit from file, and runs JS update scripts of objects in file. Default: false | `false` | ✓ |
|
|
475
584
|
| `showLogging` (`showLogging`) | `boolean` | Determines whether logging is shown in the Browser's console. Default: false | `false` | ✓ |
|
|
476
585
|
| `capturingThreshold` (`capturingThreshold`) | `number` | Determines the sensitivity of object selection. The default value of 3 is usually fine to select and drag objects both with the mouse and touch. Use larger values (e.g. 4 or 5) to make it easier to select and drag objects. Default: 3 | `3` | ✓ |
|
|
477
586
|
| `enableFileFeatures` (`enableFileFeatures`) | `boolean` | Determines whether file saving, file loading, sign in and Options > Save settings are enabled. This argument is ignored when menubar is not showing. Default: true | `true` | ✓ |
|
|
478
587
|
| `enableUndoRedo` (`enableUndoRedo`) | `boolean` | Determines whether Undo and Redo icons are shown. This argument is ignored when toolbar is not showing. Default: true | `true` | ✓ |
|
|
479
|
-
| `perspective` (`perspective`) | `
|
|
480
|
-
| `enable3d` (`enable3d`) | `boolean` | Whether 3D should be enabled (for exam mode). | - | ✓ |
|
|
481
|
-
| `enableCAS` (`enableCAS`) | `boolean` | Whether CAS should be enabled (for exam mode). | - | ✓ |
|
|
482
|
-
| `algebraInputPosition` (`algebraInputPosition`) | `"algebra" \| "top" \| "bottom"` | Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty (default), the position depends on file. | - | ✓ |
|
|
588
|
+
| `perspective` (`perspective`) | `string \| undefined` | For values see SetPerspective_Command in the GeoGebra Manual. Just for a blank start ie shouldn't be used with material_id, filename or ggbBase64 parameters | - | ✓ |
|
|
589
|
+
| `enable3d` (`enable3d`) | `boolean \| undefined` | Whether 3D should be enabled (for exam mode). | - | ✓ |
|
|
590
|
+
| `enableCAS` (`enableCAS`) | `boolean \| undefined` | Whether CAS should be enabled (for exam mode). | - | ✓ |
|
|
591
|
+
| `algebraInputPosition` (`algebraInputPosition`) | `"algebra" \| "top" \| "bottom" \| undefined` | Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty (default), the position depends on file. | - | ✓ |
|
|
483
592
|
| `preventFocus` (`preventFocus`) | `boolean` | When set to true, this prevents the applet from getting focus automatically at the start. Default: false | `false` | ✓ |
|
|
484
|
-
| `scaleContainerClass` (`scaleContainerClass`) | `string` | Name of CSS class that is used as container; applet will scale to fit into the container. | - | ✓ |
|
|
593
|
+
| `scaleContainerClass` (`scaleContainerClass`) | `string \| undefined` | Name of CSS class that is used as container; applet will scale to fit into the container. | - | ✓ |
|
|
485
594
|
| `autoHeight` (`autoHeight`) | `boolean` | `true` to restrict the width of the applet and compute height automatically, add autoHeight: true. `false` if you want the applet to be restricted by both width and height of the container | `true` | ✓ |
|
|
486
595
|
| `allowUpscale` (`allowUpscale`) | `boolean` | Determines whether automatic scaling may scale the applet up. Default: false | `false` | ✓ |
|
|
487
596
|
| `playButton` (`playButton`) | `boolean` | Determines whether a preview image and a play button should be rendered in place of the applet. Pushing the play button initializes the applet. Default: false | `false` | ✓ |
|
|
@@ -489,21 +598,33 @@ npm install @webwriter/geogebra
|
|
|
489
598
|
| `showAnimationButton` (`showAnimationButton`) | `boolean` | Whether animation button should be visible | `false` | ✓ |
|
|
490
599
|
| `showSuggestionButtons` (`showSuggestionButtons`) | `boolean` | Whether suggestion buttons (special points, solve) in Algebra View should be visible | `false` | ✓ |
|
|
491
600
|
| `showStartTooltip` (`showStartTooltip`) | `boolean` | Whether "Welcome" tooltip should be shown | `false` | ✓ |
|
|
492
|
-
| `rounding` (`rounding`) | `string` | String composed of number of decimal places and flags — valid flags are "s" for significant digits and "r" for rational numbers. Hence "10" means 10 decimal places, "10s" stands for 10 significant digits. | - | ✓ |
|
|
601
|
+
| `rounding` (`rounding`) | `string \| undefined` | String composed of number of decimal places and flags — valid flags are "s" for significant digits and "r" for rational numbers. Hence "10" means 10 decimal places, "10s" stands for 10 significant digits. | - | ✓ |
|
|
493
602
|
| `buttonShadows` (`buttonShadows`) | `boolean` | Whether buttons should have shadow | `false` | ✓ |
|
|
494
|
-
| `buttonRounding` (`buttonRounding`) | `
|
|
495
|
-
| `buttonBorderColor` (`buttonBorderColor`) | `string` | Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | - | ✓ |
|
|
496
|
-
| `editorBackgroundColor` (`editorBackgroundColor`) | `string` | Background color of the evaluator app | - | ✓ |
|
|
497
|
-
| `editorForegroundColor` (`editorForegroundColor`) | `string` | Foreground (text) color of the equation editor (appname = "evaluator") | - | ✓ |
|
|
603
|
+
| `buttonRounding` (`buttonRounding`) | `number` | Relative radius of button's rounded border. The border radius in pixels is buttonRounding * height /2, where height is the height of the button. Default: 0.2 | `0.2` | ✓ |
|
|
604
|
+
| `buttonBorderColor` (`buttonBorderColor`) | `string \| undefined` | Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | - | ✓ |
|
|
605
|
+
| `editorBackgroundColor` (`editorBackgroundColor`) | `string \| undefined` | Background color of the evaluator app | - | ✓ |
|
|
606
|
+
| `editorForegroundColor` (`editorForegroundColor`) | `string \| undefined` | Foreground (text) color of the equation editor (appname = "evaluator") | - | ✓ |
|
|
498
607
|
| `textmode` (`textmode`) | `boolean` | Whether editor is in text mode or not (appname = "evaluator"). Default: false | `false` | ✓ |
|
|
499
|
-
| `showKeyboardOnFocus` (`showKeyboardOnFocus`) | `boolean` | Whether to show keyboard when input is focused. When set to true, keyboard is always shown, for false it never appears, for auto it's shown unless closed by user. Default: true in evaluator app, auto in other apps | - | ✓ |
|
|
500
|
-
| `keyboardType` (`keyboardType`) | `"scientific" \| "normal" \| "notes"` | Which keyboard is shown for equation editor (appname = "evaluator") | - | ✓ |
|
|
608
|
+
| `showKeyboardOnFocus` (`showKeyboardOnFocus`) | `boolean \| undefined` | Whether to show keyboard when input is focused. When set to true, keyboard is always shown, for false it never appears, for auto it's shown unless closed by user. Default: true in evaluator app, auto in other apps | - | ✓ |
|
|
609
|
+
| `keyboardType` (`keyboardType`) | `"scientific" \| "normal" \| "notes" \| undefined` | Which keyboard is shown for equation editor (appname = "evaluator") | - | ✓ |
|
|
501
610
|
| `transparentGraphics` (`transparentGraphics`) | `boolean` | Whether the Graphics View and Graphics View 2 should be transparent | `false` | ✓ |
|
|
502
611
|
| `disabledJavaScript` (`disabledJavaScript`) | `boolean` | Whether running JavaScript from material files is disabled or not. | `false` | ✓ |
|
|
503
|
-
| `detachedKeyboardParent` (`detachedKeyboardParent`) | `string` | When set, the keyboard should be attached to the first element in DOM that fits the selector. | - | ✓ |
|
|
612
|
+
| `detachedKeyboardParent` (`detachedKeyboardParent`) | `string \| undefined` | When set, the keyboard should be attached to the first element in DOM that fits the selector. | - | ✓ |
|
|
504
613
|
|
|
505
614
|
*Fields including [properties](https://developer.mozilla.org/en-US/docs/Glossary/Property/JavaScript) and [attributes](https://developer.mozilla.org/en-US/docs/Glossary/Attribute) define the current state of the widget and offer customization options.*
|
|
506
615
|
|
|
616
|
+
## Methods
|
|
617
|
+
| Name | Description | Parameters |
|
|
618
|
+
| :--: | :---------: | :-------: |
|
|
619
|
+
| `importConstruction` | - | `files: File[]`
|
|
620
|
+
| `importGgb` | - | `file: File`
|
|
621
|
+
| `exportGgb` | - | -
|
|
622
|
+
| `exportPng` | - | -
|
|
623
|
+
| `exportSvg` | - | -
|
|
624
|
+
| `focus` | - | `options: FocusOptions`
|
|
625
|
+
|
|
626
|
+
*[Methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions) allow programmatic access to the widget.*
|
|
627
|
+
|
|
507
628
|
## Events
|
|
508
629
|
| Name | Description |
|
|
509
630
|
| :--: | :---------: |
|
|
@@ -512,14 +633,23 @@ npm install @webwriter/geogebra
|
|
|
512
633
|
|
|
513
634
|
*[Events](https://developer.mozilla.org/en-US/docs/Web/Events) are dispatched by the widget after certain triggers.*
|
|
514
635
|
|
|
636
|
+
## CSS parts
|
|
637
|
+
| Name | Description |
|
|
638
|
+
| :--: | :---------: |
|
|
639
|
+
| applet | The iframe that holds the GeoGebra applet. |
|
|
640
|
+
|
|
641
|
+
*[CSS parts](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_shadow_parts) allow freely styling internals of the widget with CSS.*
|
|
642
|
+
|
|
515
643
|
## Editing config
|
|
516
644
|
| Name | Value |
|
|
517
645
|
| :--: | :---------: |
|
|
518
646
|
| `content` | `text*` |
|
|
647
|
+
| `importFormats` | `.ggb` |
|
|
648
|
+
| `exportFormats` | `.ggb,image/png,image/svg+xml` |
|
|
519
649
|
|
|
520
650
|
*The [editing config](https://webwriter.app/docs/packages/configuring/#editingconfig) defines how explorable authoring tools such as [WebWriter](https://webwriter.app) treat the widget.*
|
|
521
651
|
|
|
522
|
-
*No public
|
|
652
|
+
*No public slots, or custom CSS properties.*
|
|
523
653
|
|
|
524
654
|
|
|
525
655
|
## `WebwriterGeogebraClassic` (`<webwriter-geogebra-classic>`)
|
|
@@ -552,10 +682,15 @@ npm install @webwriter/geogebra
|
|
|
552
682
|
| `type` (`type`) | `"classic" \| "geometry" \| "3d" \| "suite" \| "evaluator" \| "scientific" \| "notes"` | app name, default: "classic". "graphing" … GeoGebra Graphing Calculator "geometry" … GeoGebra Geometry "3d" … GeoGebra 3D Graphing Calculator "classic" … GeoGebra Classic "suite" … GeoGebra Calculator Suite "evaluator" … Equation Editor "scientific" …Scientific Calculator "notes" … GeoGebra Notes | `"classic"` | ✓ |
|
|
553
683
|
| `showZoomButtons` (`showZoomButtons`) | `boolean` | States whether the zoom in / zoom out / home buttons should be shown in the Graphics View or not. Default: false | `true` | ✓ |
|
|
554
684
|
| `showFullscreenButton` (`showFullscreenButton`) | `boolean` | Whether fullscreen button should be visible | `true` | ✓ |
|
|
685
|
+
| `WebwriterGeogebraClassic.options` | - | - | `geogebraOptions` | ✗ |
|
|
686
|
+
| `WebwriterGeogebraClassic.actions` | `object` | - | `{ importConstruction: { label: (widget: {msg: MsgFn}) => ({_: widget.msg("Import construction")}), input: {type: "file" as const, accept: ".ggb", multiple: false}, }, }` | ✗ |
|
|
687
|
+
| `WebwriterGeogebraClassic.convertFrom` | `object` | - | `{".ggb": "importGgb"}` | ✗ |
|
|
688
|
+
| `WebwriterGeogebraClassic.convertTo` | `object` | - | `{".ggb": "exportGgb", "image/png": "exportPng", "image/svg+xml": "exportSvg"}` | ✗ |
|
|
689
|
+
| `msg` | `MsgFn` | - | - | ✗ |
|
|
555
690
|
| `ggbStyles` (`ggbStyles`) | `string` | Custom CSS styles to apply to the GeoGebra applet. | - | ✗ |
|
|
556
691
|
| `width` (`width`) | `number` | Applet width | `800` | ✓ |
|
|
557
692
|
| `height` (`height`) | `number` | Applet height | `450` | ✓ |
|
|
558
|
-
| `src` (`src`) | `string` | Source of the GeoGebra file to load (base64-encoded string, material ID prefixed with "ggbid:", or file URL) | - | ✓ |
|
|
693
|
+
| `src` (`src`) | `string \| undefined` | Source of the GeoGebra file to load (base64-encoded string, material ID prefixed with "ggbid:", or file URL) | - | ✓ |
|
|
559
694
|
| `borderColor` (`borderColor`) | `string` | Color of the border line drawn around the applet panel (as hex rgb string). Default: gray | `"gray"` | ✓ |
|
|
560
695
|
| `borderRadius` (`borderRadius`) | `number` | Size of applet's border radius in pixels. | `1` | ✓ |
|
|
561
696
|
| `enableRightClick` (`enableRightClick`) | `boolean` | States whether right clicks should be handled by the applet. Setting this parameter to "false" disables context menus, properties dialogs and right-click-zooming. Default: true. NB also enables/disables some keyboard shortcuts eg Delete and Ctrl + R (recompute all objects). Default: true | `true` | ✓ |
|
|
@@ -565,26 +700,26 @@ npm install @webwriter/geogebra
|
|
|
565
700
|
| `showMenuBar` (`showMenuBar`) | `boolean` | States whether the menubar of GeoGebra should be shown in the applet. Default: false | `false` | ✓ |
|
|
566
701
|
| `showToolBar` (`showToolBar`) | `boolean` | States whether the toolbar with the construction mode buttons should be shown in the applet. Default: false | `true` | ✓ |
|
|
567
702
|
| `showToolBarHelp` (`showToolBarHelp`) | `boolean` | States whether the toolbar help text right to the toolbar buttons should be shown in the applet | `false` | ✓ |
|
|
568
|
-
| `customToolBar` (`customToolBar`) | `string` | Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, `,` adds a separator within a menu, `\|` starts a new menu and `\|\|` adds a separator in the toolbar before starting a new menu. This will override the saved toolbar from the .ggb file / base64 string. Custom tools are numbered 100 001, 100 002, etc | - | ✓ |
|
|
703
|
+
| `customToolBar` (`customToolBar`) | `string \| undefined` | Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, `,` adds a separator within a menu, `\|` starts a new menu and `\|\|` adds a separator in the toolbar before starting a new menu. This will override the saved toolbar from the .ggb file / base64 string. Custom tools are numbered 100 001, 100 002, etc | - | ✓ |
|
|
569
704
|
| `showAlgebraInput` (`showAlgebraInput`) | `boolean` | States whether the algebra input line (with input field, greek letters and command list) should be shown in the applet. Default: false | `true` | ✓ |
|
|
570
705
|
| `showResetIcon` (`showResetIcon`) | `boolean` | States whether a small icon (GeoGebra ellipse) should be shown in the upper right corner of the applet. Clicking on this icon resets the applet (i.e. it reloads the file given in the filename parameter). Default: false | `false` | ✓ |
|
|
571
|
-
| `language` (`language`) | `
|
|
572
|
-
| `country` (`country`) | `
|
|
573
|
-
| `appletId` (`appletId`) | `
|
|
706
|
+
| `language` (`language`) | `string \| undefined` | ISO language string. GeoGebra tries to set your local language automatically (if it is available among the supported languages, of course). The default language for unsupported languages is English. If you want to specify a certain language manually, please use this parameter. | - | ✓ |
|
|
707
|
+
| `country` (`country`) | `string \| undefined` | ISO country string. This parameter only makes sense if you use it together with the language parameter. | - | ✓ |
|
|
708
|
+
| `appletId` (`appletId`) | `string \| undefined` | This parameter allows you to specify the argument passed to the JavaScript function ggbOnInit(), which is called once the applet is fully initialised. This is useful when you have multiple applets on a page. | - | ✓ |
|
|
574
709
|
| `allowStyleBar` (`allowStyleBar`) | `boolean` | Determines whether the Style Bar can be shown (or will be shown if just Graphics View 1 is showing). Default: false | `false` | ✓ |
|
|
575
710
|
| `randomize` (`randomize`) | `boolean` | Determines whether random numbers should be randomized on file load. Useful when you want the app to reload in exactly the same state it was saved. Default: true | `true` | ✓ |
|
|
576
|
-
| `randomSeed` (`randomSeed`) | `number` | Specify seed for random numbers. Note that if you save a state of the app after user interacted with it and try to reload that state with the same randomSeed, you may get a different result. Use randomize for those use-cases. | - | ✓ |
|
|
711
|
+
| `randomSeed` (`randomSeed`) | `number \| undefined` | Specify seed for random numbers. Note that if you save a state of the app after user interacted with it and try to reload that state with the same randomSeed, you may get a different result. Use randomize for those use-cases. | - | ✓ |
|
|
577
712
|
| `useBrowserForJs` (`useBrowserForJs`) | `boolean` | When true, GeoGebra: runs ggbOnInit from HTML, ignores ggbOnInit from file, and ignores JS update scripts of objects in file. When false, GeoGebra: ignores ggbOnInit from HTML (use appletOnLoad parameter of GGBApplet instead), runs ggbOnInit from file, and runs JS update scripts of objects in file. Default: false | `false` | ✓ |
|
|
578
713
|
| `showLogging` (`showLogging`) | `boolean` | Determines whether logging is shown in the Browser's console. Default: false | `false` | ✓ |
|
|
579
714
|
| `capturingThreshold` (`capturingThreshold`) | `number` | Determines the sensitivity of object selection. The default value of 3 is usually fine to select and drag objects both with the mouse and touch. Use larger values (e.g. 4 or 5) to make it easier to select and drag objects. Default: 3 | `3` | ✓ |
|
|
580
715
|
| `enableFileFeatures` (`enableFileFeatures`) | `boolean` | Determines whether file saving, file loading, sign in and Options > Save settings are enabled. This argument is ignored when menubar is not showing. Default: true | `true` | ✓ |
|
|
581
716
|
| `enableUndoRedo` (`enableUndoRedo`) | `boolean` | Determines whether Undo and Redo icons are shown. This argument is ignored when toolbar is not showing. Default: true | `true` | ✓ |
|
|
582
|
-
| `perspective` (`perspective`) | `
|
|
583
|
-
| `enable3d` (`enable3d`) | `boolean` | Whether 3D should be enabled (for exam mode). | - | ✓ |
|
|
584
|
-
| `enableCAS` (`enableCAS`) | `boolean` | Whether CAS should be enabled (for exam mode). | - | ✓ |
|
|
585
|
-
| `algebraInputPosition` (`algebraInputPosition`) | `"algebra" \| "top" \| "bottom"` | Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty (default), the position depends on file. | - | ✓ |
|
|
717
|
+
| `perspective` (`perspective`) | `string \| undefined` | For values see SetPerspective_Command in the GeoGebra Manual. Just for a blank start ie shouldn't be used with material_id, filename or ggbBase64 parameters | - | ✓ |
|
|
718
|
+
| `enable3d` (`enable3d`) | `boolean \| undefined` | Whether 3D should be enabled (for exam mode). | - | ✓ |
|
|
719
|
+
| `enableCAS` (`enableCAS`) | `boolean \| undefined` | Whether CAS should be enabled (for exam mode). | - | ✓ |
|
|
720
|
+
| `algebraInputPosition` (`algebraInputPosition`) | `"algebra" \| "top" \| "bottom" \| undefined` | Determines whether input bar should be shown in algebra, on top of the applet or under the applet. When left empty (default), the position depends on file. | - | ✓ |
|
|
586
721
|
| `preventFocus` (`preventFocus`) | `boolean` | When set to true, this prevents the applet from getting focus automatically at the start. Default: false | `false` | ✓ |
|
|
587
|
-
| `scaleContainerClass` (`scaleContainerClass`) | `string` | Name of CSS class that is used as container; applet will scale to fit into the container. | - | ✓ |
|
|
722
|
+
| `scaleContainerClass` (`scaleContainerClass`) | `string \| undefined` | Name of CSS class that is used as container; applet will scale to fit into the container. | - | ✓ |
|
|
588
723
|
| `autoHeight` (`autoHeight`) | `boolean` | `true` to restrict the width of the applet and compute height automatically, add autoHeight: true. `false` if you want the applet to be restricted by both width and height of the container | `true` | ✓ |
|
|
589
724
|
| `allowUpscale` (`allowUpscale`) | `boolean` | Determines whether automatic scaling may scale the applet up. Default: false | `false` | ✓ |
|
|
590
725
|
| `playButton` (`playButton`) | `boolean` | Determines whether a preview image and a play button should be rendered in place of the applet. Pushing the play button initializes the applet. Default: false | `false` | ✓ |
|
|
@@ -592,21 +727,33 @@ npm install @webwriter/geogebra
|
|
|
592
727
|
| `showAnimationButton` (`showAnimationButton`) | `boolean` | Whether animation button should be visible | `false` | ✓ |
|
|
593
728
|
| `showSuggestionButtons` (`showSuggestionButtons`) | `boolean` | Whether suggestion buttons (special points, solve) in Algebra View should be visible | `false` | ✓ |
|
|
594
729
|
| `showStartTooltip` (`showStartTooltip`) | `boolean` | Whether "Welcome" tooltip should be shown | `false` | ✓ |
|
|
595
|
-
| `rounding` (`rounding`) | `string` | String composed of number of decimal places and flags — valid flags are "s" for significant digits and "r" for rational numbers. Hence "10" means 10 decimal places, "10s" stands for 10 significant digits. | - | ✓ |
|
|
730
|
+
| `rounding` (`rounding`) | `string \| undefined` | String composed of number of decimal places and flags — valid flags are "s" for significant digits and "r" for rational numbers. Hence "10" means 10 decimal places, "10s" stands for 10 significant digits. | - | ✓ |
|
|
596
731
|
| `buttonShadows` (`buttonShadows`) | `boolean` | Whether buttons should have shadow | `false` | ✓ |
|
|
597
|
-
| `buttonRounding` (`buttonRounding`) | `
|
|
598
|
-
| `buttonBorderColor` (`buttonBorderColor`) | `string` | Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | - | ✓ |
|
|
599
|
-
| `editorBackgroundColor` (`editorBackgroundColor`) | `string` | Background color of the evaluator app | - | ✓ |
|
|
600
|
-
| `editorForegroundColor` (`editorForegroundColor`) | `string` | Foreground (text) color of the equation editor (appname = "evaluator") | - | ✓ |
|
|
732
|
+
| `buttonRounding` (`buttonRounding`) | `number` | Relative radius of button's rounded border. The border radius in pixels is buttonRounding * height /2, where height is the height of the button. Default: 0.2 | `0.2` | ✓ |
|
|
733
|
+
| `buttonBorderColor` (`buttonBorderColor`) | `string \| undefined` | Border color of buttons on the graphics view. Default is black, if the button background is white, otherwise one shade darker than the background color | - | ✓ |
|
|
734
|
+
| `editorBackgroundColor` (`editorBackgroundColor`) | `string \| undefined` | Background color of the evaluator app | - | ✓ |
|
|
735
|
+
| `editorForegroundColor` (`editorForegroundColor`) | `string \| undefined` | Foreground (text) color of the equation editor (appname = "evaluator") | - | ✓ |
|
|
601
736
|
| `textmode` (`textmode`) | `boolean` | Whether editor is in text mode or not (appname = "evaluator"). Default: false | `false` | ✓ |
|
|
602
|
-
| `showKeyboardOnFocus` (`showKeyboardOnFocus`) | `boolean` | Whether to show keyboard when input is focused. When set to true, keyboard is always shown, for false it never appears, for auto it's shown unless closed by user. Default: true in evaluator app, auto in other apps | - | ✓ |
|
|
603
|
-
| `keyboardType` (`keyboardType`) | `"scientific" \| "normal" \| "notes"` | Which keyboard is shown for equation editor (appname = "evaluator") | - | ✓ |
|
|
737
|
+
| `showKeyboardOnFocus` (`showKeyboardOnFocus`) | `boolean \| undefined` | Whether to show keyboard when input is focused. When set to true, keyboard is always shown, for false it never appears, for auto it's shown unless closed by user. Default: true in evaluator app, auto in other apps | - | ✓ |
|
|
738
|
+
| `keyboardType` (`keyboardType`) | `"scientific" \| "normal" \| "notes" \| undefined` | Which keyboard is shown for equation editor (appname = "evaluator") | - | ✓ |
|
|
604
739
|
| `transparentGraphics` (`transparentGraphics`) | `boolean` | Whether the Graphics View and Graphics View 2 should be transparent | `false` | ✓ |
|
|
605
740
|
| `disabledJavaScript` (`disabledJavaScript`) | `boolean` | Whether running JavaScript from material files is disabled or not. | `false` | ✓ |
|
|
606
|
-
| `detachedKeyboardParent` (`detachedKeyboardParent`) | `string` | When set, the keyboard should be attached to the first element in DOM that fits the selector. | - | ✓ |
|
|
741
|
+
| `detachedKeyboardParent` (`detachedKeyboardParent`) | `string \| undefined` | When set, the keyboard should be attached to the first element in DOM that fits the selector. | - | ✓ |
|
|
607
742
|
|
|
608
743
|
*Fields including [properties](https://developer.mozilla.org/en-US/docs/Glossary/Property/JavaScript) and [attributes](https://developer.mozilla.org/en-US/docs/Glossary/Attribute) define the current state of the widget and offer customization options.*
|
|
609
744
|
|
|
745
|
+
## Methods
|
|
746
|
+
| Name | Description | Parameters |
|
|
747
|
+
| :--: | :---------: | :-------: |
|
|
748
|
+
| `importConstruction` | - | `files: File[]`
|
|
749
|
+
| `importGgb` | - | `file: File`
|
|
750
|
+
| `exportGgb` | - | -
|
|
751
|
+
| `exportPng` | - | -
|
|
752
|
+
| `exportSvg` | - | -
|
|
753
|
+
| `focus` | - | `options: FocusOptions`
|
|
754
|
+
|
|
755
|
+
*[Methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions) allow programmatic access to the widget.*
|
|
756
|
+
|
|
610
757
|
## Events
|
|
611
758
|
| Name | Description |
|
|
612
759
|
| :--: | :---------: |
|
|
@@ -615,15 +762,24 @@ npm install @webwriter/geogebra
|
|
|
615
762
|
|
|
616
763
|
*[Events](https://developer.mozilla.org/en-US/docs/Web/Events) are dispatched by the widget after certain triggers.*
|
|
617
764
|
|
|
765
|
+
## CSS parts
|
|
766
|
+
| Name | Description |
|
|
767
|
+
| :--: | :---------: |
|
|
768
|
+
| applet | The iframe that holds the GeoGebra applet. |
|
|
769
|
+
|
|
770
|
+
*[CSS parts](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_shadow_parts) allow freely styling internals of the widget with CSS.*
|
|
771
|
+
|
|
618
772
|
## Editing config
|
|
619
773
|
| Name | Value |
|
|
620
774
|
| :--: | :---------: |
|
|
621
775
|
| `content` | `text*` |
|
|
776
|
+
| `importFormats` | `.ggb` |
|
|
777
|
+
| `exportFormats` | `.ggb,image/png,image/svg+xml` |
|
|
622
778
|
|
|
623
779
|
*The [editing config](https://webwriter.app/docs/packages/configuring/#editingconfig) defines how explorable authoring tools such as [WebWriter](https://webwriter.app) treat the widget.*
|
|
624
780
|
|
|
625
|
-
*No public
|
|
781
|
+
*No public slots, or custom CSS properties.*
|
|
626
782
|
|
|
627
783
|
|
|
628
784
|
---
|
|
629
|
-
*Generated with @webwriter/build@1.
|
|
785
|
+
*Generated with @webwriter/build@1.15.0*
|