Skip to content

Commit

Permalink
Merge pull request #39 from OpenSmock/dev-pla
Browse files Browse the repository at this point in the history
DLeafShape: Fix processUpdated bug.
  • Loading branch information
labordep authored Oct 18, 2024
2 parents 4650300 + b3fe5bb commit d08777c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 20 deletions.
2 changes: 2 additions & 0 deletions GeoView/DLeafShapeGeoViewProcessData.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ DLeafShapeGeoViewProcessData >> processUpdatedData: aKey incoming: aDShape with:

aGShape2D fillStyle: aDShape fillStyle.
aGShape2D strokeStyle: aDShape strokeStyle.

^ aGShape2D
]
13 changes: 12 additions & 1 deletion GeoView/DShapeGeoViewProcessData.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DShapeGeoViewProcessData >> computePositionFor: aDShape context: aContext [
DShapeGeoViewProcessData >> processCreatedData: aKey incoming: aDShape with: aGShape2D context: aContext [

(aDShape isNil or: [ aGShape2D isNil ]) ifTrue: [ ^ nil ].
aGShape2D id: aKey asString.
aGShape2D id: aKey.
^ aGShape2D
]

Expand All @@ -40,6 +40,17 @@ DShapeGeoViewProcessData >> processDeletedData: aKey incoming: aDShape with: aGS
^ aGShape2D
]

{ #category : #processing }
DShapeGeoViewProcessData >> processRecycledData: aKey incoming: aDShape with: aGShape2D context: aContext [

"clean the GShape"
aGShape2D id: nil.
aGShape2D removeProperties.
aGShape2D isComposite ifTrue:[ aGShape2D removeChildren ].

^ aGShape2D
]

{ #category : #processing }
DShapeGeoViewProcessData >> processStateChanged: aKey state: aState value: aValueOrNil with: aProducedData context: aContext [

Expand Down
5 changes: 2 additions & 3 deletions GeoView/GeoViewAbstractElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,7 @@ GeoViewAbstractElement >> preConfigurePickingResult: aPickingResult radius: aRad

| radius |
radius := aRadiusInPixels ifNil: [ 0 ].
aPickingResult radiusInPixels: radius.

aPickingResult distanceBlock: [ :gShape :point | gShape distanceTo: point ]
aPickingResult radiusInPixels: radius
]

{ #category : #'private - events' }
Expand Down Expand Up @@ -552,6 +550,7 @@ GeoViewAbstractElement >> scaleUp [
GeoViewAbstractElement >> selectedObjectIndexes: anIndexList [

anIndexList ifNil:[ ^ self ].
self layers ifEmpty: [ ^ self ].

self enqueueBlockAsTaskAndRequestRepaint: [
self layers do: [ :l | l haveDomainObjects ifTrue:[ l updateState: #selected withIndexes: anIndexList ] ].
Expand Down
1 change: 0 additions & 1 deletion GeoView/GeoViewDefaultInteractionsStrategy.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ GeoViewDefaultInteractionsStrategy >> clickEvent: anEvent [
"pick the geoview on click"

| element point pickingResult event |

self flag:'laborde, need to report bloc bug because there is a click with a drag... patch with checking mouse down position'.
self isMapMoving ifTrue:[^ self].

Expand Down
17 changes: 2 additions & 15 deletions GeoView/GeoViewPickingResult.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ Class {
#superclass : #SmockPickingResult,
#instVars : [
'cartesianCoordinates',
'absoluteCoordinates',
'distanceBlock'
'absoluteCoordinates'
],
#category : #'GeoView-Core'
}
Expand All @@ -29,19 +28,7 @@ GeoViewPickingResult >> cartesianCoordinates: anObject [
cartesianCoordinates := anObject
]

{ #category : #accessing }
GeoViewPickingResult >> distanceBlock [

^ distanceBlock
]

{ #category : #accessing }
GeoViewPickingResult >> distanceBlock: anObject [

distanceBlock := anObject
]

{ #category : #accessing }
{ #category : #printing }
GeoViewPickingResult >> printString [

| ws string |
Expand Down

0 comments on commit d08777c

Please sign in to comment.