Skip to content

geogebra: aborting shape creation is not captureable  #263

@okputadora

Description

@okputadora

ezgif com-video-to-gif

If the user in control starts constructing a shape and then aborts that construction (by switching tools for example) the points of the incomplete shape are erased. However, this erasure does not trigger any of the event listeners (except for clientListener("deselect") which is not helpful because anytime you click a new point it deselects the previous point). This causes the graph to get out of sync.

Potential solution: track what tool the user has selected, and then track whether a shape is in progress or completed. For example:

  1. The user selects the polygon tool this.currentTool = 16; this.shapeInProgress = null
  2. The user creates a point -- addListener(label) => if this.currentTool is a shape creation tool* this.shapeInProgress = true; this.currentShapePoints.push(label)
  3. The user completes the shape -- addListener(label) label.indexOf('polygon' || 'triangle' || 'circle' etc. this.shapeInprogress = false; this.currentShapePoints = []
  4. or the user aborts the shape --- clientListener, mode has changed. if (shapeInProgress) emit remove event for each point in this.currentShapePoints

* this might be tedious to deduce...a lot of tools can be used to create shaoe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions