1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-06 18:18:53 +08:00

skip node if there is no node id

This commit is contained in:
lana-k
2025-11-01 19:48:22 +01:00
parent 3d1e822cdc
commit e4b35bac0a
2 changed files with 6 additions and 46 deletions

View File

@@ -33,48 +33,6 @@ export default {
</script> </script>
<style> <style>
@font-face {
font-family: 'Open Sans';
src: url('@/assets/fonts/OpenSans-Regular.woff2');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: 'Open Sans';
src: url('@/assets/fonts/OpenSans-SemiBold.woff2');
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: 'Open Sans';
src: url('@/assets/fonts/OpenSans-Bold.woff2');
font-weight: 700;
font-style: normal;
}
@font-face {
font-family: 'Open Sans';
src: url('@/assets/fonts/OpenSans-Italic.woff2');
font-weight: 400;
font-style: italic;
}
@font-face {
font-family: 'Open Sans';
src: url('@/assets/fonts/OpenSans-SemiBoldItalic.woff2');
font-weight: 600;
font-style: italic;
}
@font-face {
font-family: 'Open Sans';
src: url('@/assets/fonts/OpenSans-BoldItalic.woff2');
font-weight: 700;
font-style: italic;
}
#app, #app,
.dialog, .dialog,
input, input,

View File

@@ -45,10 +45,12 @@ export function buildNodes(graph, dataSources, options) {
.map(json => JSON.parse(json)) .map(json => JSON.parse(json))
.filter(item => item[objectType] === TYPE_NODE) .filter(item => item[objectType] === TYPE_NODE)
nodes.forEach(node => { nodes.forEach(node => {
graph.addNode(node[nodeId], { if (node[nodeId]) {
data: node, graph.addNode(node[nodeId], {
labelColor: options.style.nodes.label.color data: node,
}) labelColor: options.style.nodes.label.color
})
}
}) })
} }
} }