Skip to content

Commit

Permalink
feat: make node io sockets bigger
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-fx committed Dec 14, 2023
1 parent fb762c2 commit 657eb99
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import SettingsSection from './SettingsSection.svelte';
import SettingsTemplate from './SettingsTemplate';
const store = settingsManager.store;
const store = settingsManager?.store;
</script>

{#each Object.entries($store) as [key, value]}
Expand Down
13 changes: 7 additions & 6 deletions packages/nodesystem/src/lib/view/NodeInputView.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@

.node-input-wrapper {
position: absolute;
top: 8.5px;
top: 7px;

left: -3.5px;
width: 3.5px;
height: 7px;
left: -5px;
width: 5px;
height: 10px;
box-sizing: border-box;
border-radius: 7px 0px 0px 7px;

cursor: pointer;
}

.socket-state-highlight {

// outline: solid thick hotpink;
// box-shadow: 0px 0px 5px hotpink;
&::after {
Expand All @@ -40,7 +41,7 @@
transition: opacity 0.3s ease, transform 0.3s ease;
opacity: 0;
z-index: -1;
left: -7px;
top: -7px;
left: -5px;
top: -5.5px;
border-radius: 20px;
}
4 changes: 2 additions & 2 deletions packages/nodesystem/src/lib/view/NodeOutputView.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

.node-output-wrapper {
margin-top: 7px;
width: 3.5px;
height: 7px;
width: 5px;
height: 10px;
box-sizing: border-box;
border-radius: 0px 10px 10px 0px;
position: relative;
Expand Down
9 changes: 4 additions & 5 deletions packages/nodesystem/src/lib/view/NodeSystemView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,8 @@ export default class NodeSystemView extends EventEmitter<EventMap> {
const node = this.system.findNodeById(err.id);
if (node) {
node?.view.showErrors(err.err);
return `<p>${err.err} in ${
node.attributes.name || node.attributes.type
}</p>`;
return `<p>${err.err} in ${node.attributes.name || node.attributes.type
}</p>`;
}
}
})
Expand Down Expand Up @@ -326,7 +325,7 @@ export default class NodeSystemView extends EventEmitter<EventMap> {
bindEventListeners() {
window.addEventListener('keydown', (ev) => this.handleKeyDown(ev));
window.addEventListener('keyup', (ev) => this.handleKeyUp(ev));
this.wrapper.addEventListener('mousemove', (ev) =>
window.addEventListener('mousemove', (ev) =>
this.handleMouseMove(ev),
);

Expand All @@ -341,7 +340,7 @@ export default class NodeSystemView extends EventEmitter<EventMap> {
this.wrapper.addEventListener('touchdown', (ev: MouseEvent) =>
this.handleMouseDown(ev),
);
this.wrapper.addEventListener('mouseup', (ev) => this.handleMouseUp(ev));
window.addEventListener('mouseup', (ev) => this.handleMouseUp(ev));

window.addEventListener(
'resize',
Expand Down

0 comments on commit 657eb99

Please sign in to comment.