Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passivate on minimize. #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ MolGeoButtonElementAbstract >> defaultFontSize [
^ 16
]

{ #category : #'as yet unclassified' }
{ #category : #'accessing - colors' }
MolGeoButtonElementAbstract >> hoverColor [

^ self shouldBeImplemented
Expand Down Expand Up @@ -322,13 +322,13 @@ MolGeoButtonElementAbstract >> makeNewLabelElement: aString [
^ rope asElement
]

{ #category : #'as yet unclassified' }
{ #category : #'accessing - colors' }
MolGeoButtonElementAbstract >> primaryColor [

^ self shouldBeImplemented
]

{ #category : #'as yet unclassified' }
{ #category : #'accessing - colors' }
MolGeoButtonElementAbstract >> secondaryColor [

^ self shouldBeImplemented
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ MolGeoButtonElementNotSelected class >> example [
openInNewSpace
]

{ #category : #'as yet unclassified' }
{ #category : #'accessing - colors' }
MolGeoButtonElementNotSelected >> hoverColor [

^ Color fromHexString: '#bebdbf'
]

{ #category : #'as yet unclassified' }
{ #category : #'accessing - colors' }
MolGeoButtonElementNotSelected >> primaryColor [

^ Color fromHexString: '#6c757d'
]

{ #category : #'as yet unclassified' }
{ #category : #'accessing - colors' }
MolGeoButtonElementNotSelected >> secondaryColor [

^ Color transparent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ MolGeoButtonElementSelected class >> example [
openInNewSpace
]

{ #category : #'as yet unclassified' }
{ #category : #'accessing - colors' }
MolGeoButtonElementSelected >> hoverColor [

^ Color fromHexString: '#78A7D6'
]

{ #category : #accessing }
{ #category : #'accessing - text' }
MolGeoButtonElementSelected >> makeNewLabelElement: aString [

| rope |
Expand All @@ -31,13 +31,13 @@ MolGeoButtonElementSelected >> makeNewLabelElement: aString [
^ rope asElement
]

{ #category : #'as yet unclassified' }
{ #category : #'accessing - colors' }
MolGeoButtonElementSelected >> primaryColor [

^ Color fromHexString: '#0D3151'
]

{ #category : #'as yet unclassified' }
{ #category : #'accessing - colors' }
MolGeoButtonElementSelected >> secondaryColor [

^ Color fromHexString: '#8DBEF1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MolGeoConnectedSwitchesElement class >> example [
openInNewSpace
]

{ #category : #accessing }
{ #category : #control }
MolGeoConnectedSwitchesElement >> deactivateAllSwitchesExcept: aMolGeoSwitchElement [

self switches do: [ :each | aMolGeoSwitchElement = each ifFalse: [ each state: false ] ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ Class {

{ #category : #'instance creation' }
MolGeoPosApplication class >> close [
<script>

<script>
| current |
current := MolUtils instanceOf: self class.
current ifNotNil:[ current space close ].
current := MolUtils instanceOf: MolGeoPosMapReceiver.
current ifNotNil: [ current space close ].

"Clean previous opened version if necessary"
MolComponentManager cleanUp.
MolComponentManager cleanUp
]

{ #category : #'instance creation' }
Expand All @@ -30,6 +30,12 @@ MolGeoPosApplication class >> open [
^ self new openApplication
]

{ #category : #'component control' }
MolGeoPosApplication >> activateMapComponent [

self mapComponent componentActivate
]

{ #category : #private }
MolGeoPosApplication >> iconSize [

Expand Down Expand Up @@ -138,6 +144,13 @@ MolGeoPosApplication >> makeWiFiButton [
yourself
]

{ #category : #private }
MolGeoPosApplication >> mapComponent [

^ MolComponentManager default locatorServices searchComponentTypeImplementorFor:
MolGeoPosReceiverType
]

{ #category : #private }
MolGeoPosApplication >> mapForm [

Expand All @@ -160,9 +173,20 @@ MolGeoPosApplication >> openApplication [

space root addChild: self.

"When space close, we remove the components"
space
when: BlSpaceClosedEvent
do: [ :evt | MolComponentManager cleanUp ].
do: [ :evt | self removeComponents ].

"When space minimize, we passivate the map component"
space
when: BlSpaceResizedEvent
do: [ :evt | self passivateMapComponent ].

"When space focus in (resize), we activate the map component"
space
when: BlSpaceFocusInEvent
do: [ :evt | self activateMapComponent ].

space enqueueTask: (BlTaskAction new
action: [ space center ];
Expand All @@ -174,6 +198,18 @@ MolGeoPosApplication >> openApplication [
space show
]

{ #category : #'component control' }
MolGeoPosApplication >> passivateMapComponent [

self mapComponent passivateComponent
]

{ #category : #'component control' }
MolGeoPosApplication >> removeComponents [

MolComponentManager cleanUp
]

{ #category : #private }
MolGeoPosApplication >> stopGeoPosEquipement [
"stops every possible component if it's launched"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ MolGeoPosMapReceiver class >> pystonSpec [
]'
]

{ #category : #'as yet unclassified' }
{ #category : #'background - image' }
MolGeoPosMapReceiver >> backgroundForm: aForm [

(self childWithId: #map) background: aForm.
Expand Down