fix(editor): Update canvas handle plus line size on new canvas (no-changelog) (#11157)

This commit is contained in:
Alex Grozav 2024-10-08 14:24:44 +03:00 committed by GitHub
parent 5697de4429
commit 7f7294be9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,6 +27,8 @@ const isHovered = ref(false);
const renderOptions = computed(() => render.value.options as CanvasNodeDefaultRender['options']); const renderOptions = computed(() => render.value.options as CanvasNodeDefaultRender['options']);
const runDataTotal = computed(() => runData.value?.total ?? 0);
const runDataLabel = computed(() => const runDataLabel = computed(() =>
runData.value runData.value
? i18n.baseText('ndv.output.items', { ? i18n.baseText('ndv.output.items', {
@ -38,7 +40,7 @@ const runDataLabel = computed(() =>
const isHandlePlusVisible = computed(() => !isConnecting.value || isHovered.value); const isHandlePlusVisible = computed(() => !isConnecting.value || isHovered.value);
const plusType = computed(() => ((runData.value?.total ?? 0) > 0 ? 'success' : 'default')); const plusType = computed(() => (runDataTotal.value > 0 ? 'success' : 'default'));
const plusLineSize = computed( const plusLineSize = computed(
() => () =>
@ -46,7 +48,7 @@ const plusLineSize = computed(
small: 46, small: 46,
medium: 66, medium: 66,
large: 80, large: 80,
})[(renderOptions.value.outputs?.labelSize ?? runData.value) ? 'large' : 'small'], })[(runDataTotal.value > 0 ? 'large' : renderOptions.value.outputs?.labelSize) ?? 'small'],
); );
function onMouseEnter() { function onMouseEnter() {