feat: Implement 'lineSlider' point method and warn about 'align'

This commit is contained in:
Glen Whitney 2023-10-18 09:14:23 -07:00
parent 277d9b0a8c
commit 4a12367c5d

View File

@ -196,6 +196,12 @@ function dispatchJcommand(
Text("${value}", TitlePoint + (2,5))`
'pivot'
return // already handled in postApplets
'align'
console.warn
'Label alignment is not available in GeoGebra'
'translation, as there is no facility for automatically'
'positioning labels. However, they can be dragged manually.'
return
/e\[\d+\]/
num := parseInt(name.slice(2))
{commands, callbacks, parts} :=
@ -592,6 +598,13 @@ classHandler: Record<JoyceClass, ClassHandler> :=
if args.scalar and args.scalar.length
callbacks.push (api: AppletObject) =>
api.setCoords name, ...args.scalar as XYZ
'lineSlider'
pt := args.subpoints
unless pt and pt.length is 2 then return
commands.push `${name} = Point(Line(${pt[0]}, ${pt[1]}))`
if args.scalar and args.scalar.length
callbacks.push (api: AppletObject) =>
api.setCoords name, ...args.scalar as XYZ
'midpoint'
if args.line
commands.push `${name} = Midpoint(${args.line[0]})`