Skip to content

Commit

Permalink
Fix bug and considere "user coordinates for device draw mode" (incuba…
Browse files Browse the repository at this point in the history
…tor)
  • Loading branch information
LabordePierre committed Oct 26, 2024
1 parent 50d3e7a commit d24e3c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/GeoView/DShapeGeoViewProcessData.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ DShapeGeoViewProcessData class >> isAbstract [
{ #category : #computing }
DShapeGeoViewProcessData >> computePositionFor: aDShape context: aContext [

| offset |
| offset isDeviceCoordinates |
aDShape coordinates ifNil: [ ^ aDShape coordinatesDeviceOffset ].
self processor ifNil: [ ^ nil ].

offset := aDShape coordinatesDeviceOffset ifNil: [ 0 @ 0 ].

(aDShape isComposite not and: [ aDShape isDrawModeDevice ]) ifTrue: [
^ aDShape coordinates + offset ].
isDeviceCoordinates := aDShape coordinates isPoint.
(aDShape isComposite not and: [ aDShape isDrawModeDevice and:[ isDeviceCoordinates ] ] ) ifTrue: [
^ aDShape coordinates + offset
].

^ (self processor projection projCartToPixel: (aDShape coordinates))
+ offset
Expand Down
2 changes: 1 addition & 1 deletion src/GeoView/GeoViewDShapesLayer.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ GeoViewDShapesLayer >> updateDShapes: aDShapeList [
self userDataChangesMutex critical: [
toUpdate := OrderedCollection new.
aDShapeList do: [ :e |
(self haveDShapeKey: e key) ifFalse: [
(self haveDShapeKey: e key) ifTrue: [
self userModel at: e key put: e.
toUpdate add: e ] ].
super updateDShapes: toUpdate ]
Expand Down

0 comments on commit d24e3c3

Please sign in to comment.