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

Don't send plugin ping while plugin is open if keep_active is True #3284

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
12 changes: 6 additions & 6 deletions jdaviz/components/tray_plugin.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-container
<v-container
class="tray-plugin"
style="padding-left: 24px; padding-right: 24px; padding-top: 12px" >
<v-row>
Expand All @@ -9,9 +9,9 @@
<div style="width: 32px">
<j-tooltip tipid='plugin-api-hints'>
<v-btn
v-if="api_hints_enabled !== undefined && config && plugin_key && checkNotebookContext()"
v-if="api_hints_enabled !== undefined && config && plugin_key && checkNotebookContext()"
id="api-hints-button"
icon
icon
:class="api_hints_enabled ? 'api-hint' : null"
@click="() => {$emit('update:api_hints_enabled', !api_hints_enabled)}"
>
Expand Down Expand Up @@ -75,7 +75,7 @@ module.exports = {
if (!this.$el.isConnected) {
return
}
if (!document.hidden) {
if (!document.hidden && !this.keep_active) {
this.$emit('plugin-ping', Date.now())
}
if (this.scroll_to) {
Expand All @@ -86,7 +86,7 @@ module.exports = {
return
}
setTimeout(() => {
this.sendPing(true)
this.sendPing(true)
}, 200) // ms
},
checkNotebookContext() {
Expand Down Expand Up @@ -141,7 +141,7 @@ module.exports = {
/* tighten default padding on any sub expansion headers */
padding: 6px !important;
}

.v-expansion-panel-header .row {
/* override margin from above and replace with equal top and bottom margins
for the text in the panel header */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:link="docs_link || 'https://jdaviz.readthedocs.io/en/'+vdocs+'/'+config+'/plugins.html#plot-options'"
:uses_active_status="uses_active_status"
@plugin-ping="plugin_ping($event)"
:keep_active.sync="keep_active"
:popout_button="popout_button"
:scroll_to.sync="scroll_to">

Expand Down Expand Up @@ -116,7 +117,7 @@
:api_hints_enabled="api_hints_enabled"
@click="reset_viewer_bounds"
>
{{api_hints_enabled ?
{{api_hints_enabled ?
'plg.reset_viewer_bounds()'
:
'Reset viewer bounds'
Expand Down Expand Up @@ -275,7 +276,7 @@
:api_hints_enabled="api_hints_enabled"
wait="300"
max="1"
step="0.01"
step="0.01"
:value.sync="subset_opacity_value"
/>
</glue-state-sync-wrapper>
Expand Down Expand Up @@ -771,7 +772,7 @@

<div v-if="contour_mode_value === 'Linear'">
<glue-state-sync-wrapper :sync="contour_min_sync" :multiselect="layer_multiselect" @unmix-state="unmix_state('contour_min')">
<glue-float-field
<glue-float-field
:label="api_hints_enabled ? 'plg.contour_min =' : 'Contour Min'"
:class="api_hints_enabled ? 'api-hint' : null"
:value.sync="contour_min_value"
Expand Down
Loading