Skip to content

Instantly share code, notes, and snippets.

@rsbohn
Created July 18, 2024 12:26
Show Gist options
  • Save rsbohn/4ae6ef0bc355f30a3818f8903bd53b92 to your computer and use it in GitHub Desktop.
Save rsbohn/4ae6ef0bc355f30a3818f8903bd53b92 to your computer and use it in GitHub Desktop.
Scatter Plot Point Event Handler
GtPlotterScatterFocusPointHandler subclass: #DexPointEventHandler
instanceVariableNames: 'chart'
classVariableNames: ''
package: 'uncertain'!
!DexPointEventHandler methodsFor: 'accessing' stamp: 'Dexter 7/18/2024 05:30'!
chart: theChart
chart := theChart! !
!DexPointEventHandler methodsFor: 'accessing' stamp: 'Dexter 7/18/2024 06:11'!
mouseUpEvent: aBlMouseUpEvent
| p q |
aBlMouseUpEvent consumed: true.
p := aBlMouseUpEvent currentTarget.
q := (chart data at: (chart dots indexOf: p)) values first.
p phlow spawnObject: (q at: 'label') asFileReference.
"Assert stops the default click handler which seems to ignore the fact that this event is consumed.
Perhaps I need to handle the Click event instead."
self assert: false! !
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment