chore(svelte): run prettier

This commit is contained in:
moklick
2023-02-28 12:48:52 +01:00
parent 62a6278682
commit dda21e1fd2
64 changed files with 1669 additions and 1646 deletions
@@ -1,11 +1,11 @@
<script lang="ts">
import { getContext } from 'svelte';
import { getContext } from 'svelte';
import cc from 'classcat';
import { Position, type Connection, type HandleProps } from '@reactflow/system';
import { isMouseEvent } from '@reactflow/utils';
import { Position, type Connection, type HandleProps } from '@reactflow/system';
import { isMouseEvent } from '@reactflow/utils';
import { handlePointerDown } from './handler';
import { useStore } from '$lib/store';
import { handlePointerDown } from './handler';
import { useStore } from '$lib/store';
type $$Props = HandleProps;
@@ -34,40 +34,40 @@
} = useStore();
function onConnectExtended(params: Connection) {
addEdge(params);
// @todo add props
// onConnectAction?.(edgeParams);
// onConnect?.(edgeParams);
};
addEdge(params);
// @todo add props
// onConnectAction?.(edgeParams);
// onConnect?.(edgeParams);
}
function onPointerDown(event: MouseEvent | TouchEvent) {
const isMouseTriggered = isMouseEvent(event);
function onPointerDown(event: MouseEvent | TouchEvent) {
const isMouseTriggered = isMouseEvent(event);
if ((isMouseTriggered && event.button === 0) || !isMouseTriggered) {
handlePointerDown({
event,
handleId,
nodeId,
isTarget,
connectionRadius: $connectionRadius,
domNode: $domNode,
nodes: $nodes,
connectionMode: $connectionMode,
transform,
isValidConnection: isValidConnection!,
onConnect: onConnectExtended,
updateConnection,
cancelConnection,
panBy,
});
}
if ((isMouseTriggered && event.button === 0) || !isMouseTriggered) {
handlePointerDown({
event,
handleId,
nodeId,
isTarget,
connectionRadius: $connectionRadius,
domNode: $domNode,
nodes: $nodes,
connectionMode: $connectionMode,
transform,
isValidConnection: isValidConnection!,
onConnect: onConnectExtended,
updateConnection,
cancelConnection,
panBy
});
}
// if (isMouseTriggered) {
// onMouseDown?.(event);
// } else {
// onTouchStart?.(event);
// }
};
// if (isMouseTriggered) {
// onMouseDown?.(event);
// } else {
// onTouchStart?.(event);
// }
}
</script>
<div
@@ -92,7 +92,6 @@
<slot />
</div>
<style>
.react-flow__handle {
position: absolute;
@@ -134,4 +133,4 @@
left: 100%;
transform: translate(-50%, -50%);
}
</style>
</style>