Skip to content
Merged
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
10 changes: 10 additions & 0 deletions src/components/LiteGraphCanvasSplitterOverlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
:pt:gutter="getSplitterGutterClasses"
:state-key="sidebarStateKey"
state-storage="local"
@resizestart="onResizestart"
>
<SplitterPanel
v-if="sidebarLocation === 'left'"
Expand Down Expand Up @@ -50,6 +51,7 @@
"
state-key="bottom-panel-splitter"
state-storage="local"
@resizestart="onResizestart"
>
<SplitterPanel class="graph-canvas-panel relative">
<slot name="graph-canvas-panel" />
Expand Down Expand Up @@ -97,6 +99,7 @@

<script setup lang="ts">
import Splitter from 'primevue/splitter'
import type { SplitterResizeStartEvent } from 'primevue/splitter'
import SplitterPanel from 'primevue/splitterpanel'
import { computed } from 'vue'

Expand Down Expand Up @@ -148,6 +151,13 @@ const getSplitterGutterClasses = computed(() => {
// Empty string - let individual gutter styles handle visibility
return ''
})

/**
* Avoid triggering default behaviors during drag-and-drop, such as text selection.
*/
function onResizestart({ originalEvent: event }: SplitterResizeStartEvent) {
event.preventDefault()
}
</script>

<style scoped>
Expand Down