diff --git a/docs/components/Repl.vue b/docs/components/Repl.vue index dcedf57d..c9b27078 100644 --- a/docs/components/Repl.vue +++ b/docs/components/Repl.vue @@ -26,7 +26,7 @@ body, } .vue-flow__minimap { - transform: scale(50%) + transform: scale(75%); transform-origin: bottom right; }` diff --git a/docs/components/examples/custom-node/App.vue b/docs/components/examples/custom-node/App.vue index a887c37c..5008404b 100644 --- a/docs/components/examples/custom-node/App.vue +++ b/docs/components/examples/custom-node/App.vue @@ -1,24 +1,29 @@ @@ -65,18 +100,18 @@ onMounted(() => { diff --git a/docs/components/examples/custom-node/CustomNode.vue b/docs/components/examples/custom-node/CustomNode.vue index 6ef6ebb1..ecfff975 100644 --- a/docs/components/examples/custom-node/CustomNode.vue +++ b/docs/components/examples/custom-node/CustomNode.vue @@ -10,11 +10,7 @@ const props = defineProps({ }, }) -const emit = defineEmits(['change']) - -const targetHandleStyle = { background: '#555' } -const sourceHandleStyleA = { ...targetHandleStyle, top: '10px' } -const sourceHandleStyleB = { ...targetHandleStyle, bottom: '10px', top: 'auto' } +const emit = defineEmits(['change', 'gradient']) const onConnect = (params) => console.log('handle onConnect', params) @@ -22,6 +18,10 @@ const onSelect = (color) => { emit('change', color) } +const onGradient = () => { + emit('gradient') +} + const colors = computed(() => { return Object.keys(presets).map((color) => { return { @@ -34,30 +34,25 @@ const colors = computed(() => { const selectedColor = computed(() => { return colors.value.find((color) => color.value === props.data.color) }) - -