Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaf5b12a

Browse files
committed
fix: dashboard resize, drag issue for viewonly mode
1 parentad74be0 commitaf5b12a

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

‎web/src/components/dashboards/PanelContainer.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2121
@mouseleave="() => (isCurrentlyHoveredPanel = false)"
2222
data-test="dashboard-panel-container"
2323
>
24-
<divclass="drag-allow">
24+
<div:class="{ 'drag-allow': !viewOnly }">
2525
<q-bar
2626
:class="store.state.theme == 'dark' ? 'dark-mode' : 'transparent'"
2727
dense

‎web/src/views/Dashboards/RenderDashboardCharts.vue‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -531,13 +531,8 @@ export default defineComponent({
531531
column:192,// 192-column grid for fine-grained positioning
532532
cellHeight:"17px",// Base cell height
533533
margin:2,// Minimal margin between panels
534-
draggable: {
535-
enable:!props.viewOnly&&!saveDashboardData.isLoading.value,// Enable dragging unless view-only or saving
536-
handle:".drag-allow",// Only allow dragging from specific handle
537-
},
538-
resizable: {
539-
enable:!props.viewOnly&&!saveDashboardData.isLoading.value,// Enable resizing unless view-only or saving
540-
},
534+
disableResize:props.viewOnly||saveDashboardData.isLoading.value,// Disable resize in view-only
535+
disableDrag:props.viewOnly||saveDashboardData.isLoading.value,// Disable drag in view-only
541536
acceptWidgets:false,// Don't accept external widgets
542537
removable:false,// Don't allow removal by dragging out
543538
animate:false,// Disable animations for better performance
@@ -553,6 +548,12 @@ export default defineComponent({
553548
554549
// Handle layout changes (drag/resize) - only update layout data, don't save during operations
555550
gridStackInstance.on("change",async (event,items)=> {
551+
552+
// skip if viewOnly mode
553+
if (props.viewOnly) {
554+
return;
555+
}
556+
556557
if (gridStackUpdateInProgress) {
557558
return;
558559
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp