Skip to content

Commit

Permalink
Merge pull request #1647 from OpenC3/cursor
Browse files Browse the repository at this point in the history
Default screen cursor, pointer only on linked screens
  • Loading branch information
ryanmelt authored Oct 24, 2024
2 parents 904875b + 4111050 commit 2f7f8d0
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ HORIZONTAL
SETTING SCREEN <%= target_name %> LIMITS
SETTING TLM <%= target_name %> HEALTH_STATUS TEMP1
ROLLUP equipment "Processor" "CPU"
SETTING SCREEN <%= target_name %> ADCS
# No SCREEN should display without pointer cursor
SETTING TLM <%= target_name %> HEALTH_STATUS TEMP4
ROLLUP satellite-transmit "Satellite" "all temps"
SETTING SCREEN <%= target_name %> HS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ HORIZONTAL
SETTING SCREEN <%= target_name %> LIMITS
SETTING TLM <%= target_name %> HEALTH_STATUS TEMP1
ROLLUP equipment "Processor" "CPU"
SETTING SCREEN <%= target_name %> ADCS
# No SCREEN should display without pointer cursor
SETTING TLM <%= target_name %> HEALTH_STATUS TEMP4
ROLLUP satellite-transmit "Satellite" "all temps"
SETTING SCREEN <%= target_name %> HS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<template>
<div :style="computedStyle" ref="bar">
<v-card :min-height="height" :min-width="width">
<v-card :min-height="height" :min-width="width" style="cursor: default">
<v-system-bar>
<div v-show="errors.length !== 0">
<v-tooltip top>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
:y="parameters[2]"
:width="width"
:height="height"
:style="pointerStyle"
@click="clickHandler"
/>
</template>
Expand Down Expand Up @@ -58,6 +59,17 @@ export default {
}
return '100%'
},
pointerStyle() {
if (this.screenTarget && this.screenName) {
return {
cursor: 'pointer',
}
} else {
return {
cursor: 'default',
}
}
},
},
created: function () {
// Look through the settings and get a reference to the screen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
:y="image.y"
:width="image.width"
:height="image.height"
:style="pointerStyle"
@click="clickHandler"
/>
<image
Expand All @@ -41,6 +42,7 @@
:y="defaultImage.y"
:width="defaultImage.width"
:height="defaultImage.height"
:style="pointerStyle"
@click="clickHandler"
/>
</g>
Expand Down Expand Up @@ -72,6 +74,17 @@ export default {
showDefault: function () {
return !this.images.some((image) => image.value == this.selectedValue)
},
pointerStyle() {
if (this.screenTarget && this.screenName) {
return {
cursor: 'pointer',
}
} else {
return {
cursor: 'default',
}
}
},
},
created: function () {
// Look through the settings and get a reference to the screen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
v-bind="attrs"
v-on="on"
class="rux-icon"
:style="pointerStyle"
:icon="icon"
:status="status"
:label="label"
Expand Down Expand Up @@ -76,6 +77,17 @@ export default {
}
return state
},
pointerStyle() {
if (this.screenTarget && this.screenName) {
return {
cursor: 'pointer',
}
} else {
return {
cursor: 'default',
}
}
},
},
created: function () {
this.icon = this.parameters[0]
Expand Down

0 comments on commit 2f7f8d0

Please sign in to comment.