File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed
Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -315,7 +315,17 @@ GeoViewElementTest >> testInteractionsStrategyDefaultValues [
315315
316316 self assert: geoView interactionsStrategy allowMapMoving.
317317 self assert: geoView interactionsStrategy allowMapScaling.
318- self assert: geoView interactionsStrategy isMultipleSelection
318+ self assert: geoView interactionsStrategy isMultipleSelection.
319+ self assert: geoView interactionsStrategy selectionFilterBlock equals: nil
320+ ]
321+
322+ { #category : #tests }
323+ GeoViewElementTest >> testInteractionsStrategySelectionFilter [
324+
325+ self assert: geoView interactionsStrategy selectionFilterBlock equals: nil .
326+ geoView interactionsStrategy selectionFilterBlock: [ :e | ].
327+ self assert: geoView interactionsStrategy selectionFilterBlock notNil.
328+
319329]
320330
321331{ #category : #tests }
Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ Class {
1212 ' mouseDownPosition' ,
1313 ' pickingRadius' ,
1414 ' lastMouseMoveEventTimestamp' ,
15- ' isMultipleSelection'
15+ ' isMultipleSelection' ,
16+ ' selectionFilterBlock'
1617 ],
1718 #category : #' GeoView-Events'
1819}
@@ -203,6 +204,9 @@ GeoViewInteractionsStrategy >> primaryClickEvent: anEvent [
203204 point := anEvent position.
204205
205206 pickingResult := element pickAt: point radius: self pickingRadius.
207+ self selectionFilterBlock ifNotNil: [
208+ pickingResult := pickingResult applyFilter: self selectionFilterBlock
209+ ].
206210
207211 " send picking event"
208212 event := GeoViewPickingEvent new .
@@ -251,6 +255,18 @@ GeoViewInteractionsStrategy >> pulsePeriodInMs [
251255 ^ 15 milliSecond
252256]
253257
258+ { #category : #accessing }
259+ GeoViewInteractionsStrategy >> selectionFilterBlock [
260+
261+ ^ selectionFilterBlock
262+ ]
263+
264+ { #category : #accessing }
265+ GeoViewInteractionsStrategy >> selectionFilterBlock: aSelectFilterBlock [
266+
267+ selectionFilterBlock := aSelectFilterBlock
268+ ]
269+
254270{ #category : #' events - processing' }
255271GeoViewInteractionsStrategy >> sendMouseCoordinatesChanged: anEvent [
256272
You can’t perform that action at this time.
0 commit comments