Skip to content

Commit 2f7f8d0

Browse files
authored
Merge pull request #1647 from OpenC3/cursor
Default screen cursor, pointer only on linked screens
2 parents 904875b + 4111050 commit 2f7f8d0

File tree

6 files changed

+40
-3
lines changed

6 files changed

+40
-3
lines changed

openc3-cosmos-init/plugins/packages/openc3-cosmos-demo/targets/INST/screens/rollup.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ HORIZONTAL
1111
SETTING SCREEN <%= target_name %> LIMITS
1212
SETTING TLM <%= target_name %> HEALTH_STATUS TEMP1
1313
ROLLUP equipment "Processor" "CPU"
14-
SETTING SCREEN <%= target_name %> ADCS
14+
# No SCREEN should display without pointer cursor
1515
SETTING TLM <%= target_name %> HEALTH_STATUS TEMP4
1616
ROLLUP satellite-transmit "Satellite" "all temps"
1717
SETTING SCREEN <%= target_name %> HS

openc3-cosmos-init/plugins/packages/openc3-cosmos-demo/targets/INST2/screens/rollup.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ HORIZONTAL
1111
SETTING SCREEN <%= target_name %> LIMITS
1212
SETTING TLM <%= target_name %> HEALTH_STATUS TEMP1
1313
ROLLUP equipment "Processor" "CPU"
14-
SETTING SCREEN <%= target_name %> ADCS
14+
# No SCREEN should display without pointer cursor
1515
SETTING TLM <%= target_name %> HEALTH_STATUS TEMP4
1616
ROLLUP satellite-transmit "Satellite" "all temps"
1717
SETTING SCREEN <%= target_name %> HS

openc3-cosmos-init/plugins/packages/openc3-tool-common/src/components/Openc3Screen.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
<template>
2727
<div :style="computedStyle" ref="bar">
28-
<v-card :min-height="height" :min-width="width">
28+
<v-card :min-height="height" :min-width="width" style="cursor: default">
2929
<v-system-bar>
3030
<div v-show="errors.length !== 0">
3131
<v-tooltip top>

openc3-cosmos-init/plugins/packages/openc3-tool-common/src/components/widgets/CanvasimageWidget.vue

+12
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
:y="parameters[2]"
2929
:width="width"
3030
:height="height"
31+
:style="pointerStyle"
3132
@click="clickHandler"
3233
/>
3334
</template>
@@ -58,6 +59,17 @@ export default {
5859
}
5960
return '100%'
6061
},
62+
pointerStyle() {
63+
if (this.screenTarget && this.screenName) {
64+
return {
65+
cursor: 'pointer',
66+
}
67+
} else {
68+
return {
69+
cursor: 'default',
70+
}
71+
}
72+
},
6173
},
6274
created: function () {
6375
// Look through the settings and get a reference to the screen

openc3-cosmos-init/plugins/packages/openc3-tool-common/src/components/widgets/CanvasimagevalueWidget.vue

+13
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
:y="image.y"
3232
:width="image.width"
3333
:height="image.height"
34+
:style="pointerStyle"
3435
@click="clickHandler"
3536
/>
3637
<image
@@ -41,6 +42,7 @@
4142
:y="defaultImage.y"
4243
:width="defaultImage.width"
4344
:height="defaultImage.height"
45+
:style="pointerStyle"
4446
@click="clickHandler"
4547
/>
4648
</g>
@@ -72,6 +74,17 @@ export default {
7274
showDefault: function () {
7375
return !this.images.some((image) => image.value == this.selectedValue)
7476
},
77+
pointerStyle() {
78+
if (this.screenTarget && this.screenName) {
79+
return {
80+
cursor: 'pointer',
81+
}
82+
} else {
83+
return {
84+
cursor: 'default',
85+
}
86+
}
87+
},
7588
},
7689
created: function () {
7790
// Look through the settings and get a reference to the screen

openc3-cosmos-init/plugins/packages/openc3-tool-common/src/components/widgets/RollupWidget.vue

+12
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
v-bind="attrs"
2222
v-on="on"
2323
class="rux-icon"
24+
:style="pointerStyle"
2425
:icon="icon"
2526
:status="status"
2627
:label="label"
@@ -76,6 +77,17 @@ export default {
7677
}
7778
return state
7879
},
80+
pointerStyle() {
81+
if (this.screenTarget && this.screenName) {
82+
return {
83+
cursor: 'pointer',
84+
}
85+
} else {
86+
return {
87+
cursor: 'default',
88+
}
89+
}
90+
},
7991
},
8092
created: function () {
8193
this.icon = this.parameters[0]

0 commit comments

Comments
 (0)