Merge pull request #3 from brianpetro/main

minor: build script + mute logs
This commit is contained in:
Evan's Oasis 2024-06-14 11:27:05 -04:00 committed by GitHub
commit 612a83cd89
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -20,7 +20,7 @@ const copy_to_plugins = {
name: 'copy_to_plugins',
setup(build) {
build.onEnd(() => {
const plugin_path = path.join(process.env.OBSIDIAN_PLUGINS_PATH, "smart-connections-graph-view");
const plugin_path = path.join(process.env.OBSIDIAN_PLUGINS_PATH, "smart-connections-visualizer");
if (!fs.existsSync(plugin_path)) {
fs.mkdirSync(plugin_path);
@ -61,7 +61,7 @@ const context = await esbuild.context({
format: "cjs",
target: "es2018",
logLevel: "info",
sourcemap: prod ? false : "inline",
sourcemap: "inline",
treeShaking: true,
outfile: "main.js",
plugins: [

View file

@ -1171,9 +1171,9 @@ class ScGraphItemView extends ItemView {
}
simulationTickHandler() {
console.log("Checking node positions during tick:");
// console.log("Checking node positions during tick:");
this.linkLabelSelection.each((d: any) => {
console.log(`Source: (${d.source.x}, ${d.source.y}), Target: (${d.target.x}, ${d.target.y} ${d.source})`);
// console.log(`Source: (${d.source.x}, ${d.source.y}), Target: (${d.target.x}, ${d.target.y} ${d.source})`);
});
this.nodeSelection.attr('cx', (d: any) => d.x).attr('cy', (d: any) => d.y).style('cursor', 'pointer');
this.linkSelection.attr('x1', (d: any) => d.source.x || 0).attr('y1', (d: any) => d.source.y || 0).style('cursor', 'pointer')