Skip to content

Commit 8a88252

Browse files
committed
Instrumentation: Highlight selected commands on click
1 parent 0d5a99f commit 8a88252

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

resources/js/vue/components/shared/CommandGanttChart.vue

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ export default {
8282
},
8383
deep: true,
8484
},
85+
selectedCommandId: {
86+
handler() {
87+
this.renderChart(this.commands);
88+
},
89+
},
8590
},
8691
created() {
8792
this.chart = null;
@@ -253,6 +258,7 @@ export default {
253258
const height = this.commandBarHeight;
254259
const itemType = api.value(5);
255260
const isDisabled = api.value(6);
261+
const commandId = api.value(11);
256262
257263
const style = {
258264
fill: this.colors[itemType],
@@ -267,6 +273,14 @@ export default {
267273
opacity: 0.4,
268274
});
269275
}
276+
277+
if (commandId === this.selectedCommandId) {
278+
Object.assign(style, {
279+
stroke: '#000000',
280+
lineWidth: 2,
281+
});
282+
}
283+
270284
return {
271285
type: 'rect',
272286
shape: {

0 commit comments

Comments
 (0)