Skip to content

Commit

Permalink
feat(add-get-dom-elements-export): Removed default export for domReso…
Browse files Browse the repository at this point in the history
…lver

Also, updated imports to remove default import usage.
  • Loading branch information
tehfd committed Oct 24, 2024
1 parent 0b23913 commit f4087fb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/renderer-vue/src/components/Minimap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script setup lang="ts">
import { computed, onBeforeUnmount, onMounted, ref, watch } from "vue";
import { AbstractNode } from "@baklavajs/core";
import getDomElements, { getDomElementOfNode } from "../connection/domResolver";
import { getDomElements, getDomElementOfNode } from "../connection/domResolver";
import { getPortCoordinates } from "../connection/portCoordinates";
import { useGraph, useViewModel } from "../utility";
Expand Down
6 changes: 3 additions & 3 deletions packages/renderer-vue/src/connection/ConnectionWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { computed, defineComponent, ref, onBeforeUnmount, onMounted, nextTick, watch } from "vue";
import { Connection } from "@baklavajs/core";
import ConnectionView from "./ConnectionView.vue";
import resolveDom, { IResolvedDomElements } from "./domResolver";
import { getDomElements, IResolvedDomElements } from "./domResolver";
import { TemporaryConnectionState } from "./connection";
import { useGraph } from "../utility";
Expand Down Expand Up @@ -51,8 +51,8 @@ export default defineComponent({
};
const updateCoords = () => {
const from = resolveDom(props.connection.from);
const to = resolveDom(props.connection.to);
const from = getDomElements(props.connection.from);
const to = getDomElements(props.connection.to);
if (from.node && to.node) {
if (!resizeObserver) {
resizeObserver = new ResizeObserver(() => {
Expand Down
6 changes: 3 additions & 3 deletions packages/renderer-vue/src/connection/TemporaryConnection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { computed, defineComponent } from "vue";
import ConnectionView from "./ConnectionView.vue";
import { ITemporaryConnection, TemporaryConnectionState } from "./connection";
import resolveDom from "./domResolver";
import { getDomElements } from "./domResolver";
import { getPortCoordinates } from "./portCoordinates";
export default defineComponent({
Expand All @@ -38,9 +38,9 @@ export default defineComponent({
};
}
const start = getPortCoordinates(resolveDom(props.connection.from));
const start = getPortCoordinates(getDomElements(props.connection.from));
const end = props.connection.to
? getPortCoordinates(resolveDom(props.connection.to))
? getPortCoordinates(getDomElements(props.connection.to))
: [props.connection.mx || start[0], props.connection.my || start[1]];
if (props.connection.from.isInput) {
Expand Down
1 change: 0 additions & 1 deletion packages/renderer-vue/src/connection/domResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ export function getDomElements(ni: NodeInterface): IResolvedDomElements {
port: portDOM && portDOM.length > 0 ? (portDOM[0] as HTMLElement) : null,
};
}
export default getDomElements;

0 comments on commit f4087fb

Please sign in to comment.