Skip to content

Commit

Permalink
remove unneeded debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
kctekn committed Sep 24, 2024
1 parent bb921c7 commit 448c447
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 38 deletions.
29 changes: 0 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,35 +90,6 @@ _**You can check the simple usage demo here:**_



## Version 1.0.9/1.0.10 Release Notes:

1. **Support for Named Color Input**: Added support for named color input, making it easier to select the perfect color.
2. **Frontmatter Tags as Individual Tags**: Tags in the frontmatter are now treated as individual tags, separate from the tags in the note content.
3. **File List Report Generation**: You can now generate a report of files associated with a tag by clicking on a frontmatter tag.
4. **Colorful Node Name Display**: Node names now display in color by default, not just when hovered over.
5. **Other Improvements**:
1. Updated the plugin icon.
2. Added a new general settings option to toggle whether the graph opens in the current tab.
3. Introduced a reset color button in the color settings section.

Many updates is according to https://github.com/kctekn/obsidian-TagsRoutes/discussions/9, thanks to @jeceey for the creative suggestions.



**Feature**

<img width="20%" src="https://github.com/kctekn/obsidian-TagsRoutes/blob/main/usage/v109-update.gif">

**Usage Demo**

<img width="50%" src="https://github.com/kctekn/obsidian-TagsRoutes/blob/main/usage/setup-color-v109.gif">


## Version 1.0.8 - Release Notes
Fixed a parsing tag issue: if the tag in frontmatter is wrote in a single line, it will meet error during plugin startup.

refer to https://github.com/kctekn/obsidian-TagsRoutes/issues/10 for detail

# More
**Full version history please refer to [What's-new-history](https://github.com/kctekn/obsidian-TagsRoutes/wiki/What's-new-history)**

Expand Down
11 changes: 10 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { codeBlockProcessor } from './util/CodeBlockProcessor';

export const globalProgramControl = {
useDiv : false,
debugLevel: DebugLevel.NONE,
debugLevel: DebugLevel.INFO,
useGroup: true,
allowDuplicated: false,
aimBeforeLink: true,
Expand Down Expand Up @@ -311,6 +311,15 @@ export default class TagsRoutes extends Plugin {
const loadedSettings = await this.loadData() //as Settings;
if (loadedSettings?.saveSpecVer && loadedSettings.saveSpecVer >= minSaveSpecVer) {
this.mergeDeep(this.settings, loadedSettings)
if (loadedSettings.saveSpecVer != currentSaveSpecVer) {
DebugMsg(DebugLevel.INFO, `Save spec version ${loadedSettings.saveSpecVer} merged.`)
}
} else {
if (loadedSettings?.saveSpecVer) {
DebugMsg(DebugLevel.INFO,`Override save spec version ${loadedSettings.saveSpecVer}.`)
} else {
DebugMsg(DebugLevel.INFO,`New installation or very old version: Using default settings.`)
}
}
this.settings.customSlot = this.settings[this.settings.currentTheme];
this.settings.currentSlotNum = this.settings.themeSlotNum[this.settings.currentTheme];
Expand Down
16 changes: 8 additions & 8 deletions src/views/TagsRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export class TagRoutesView extends ItemView {
const parts = color.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(?:\d+(?:\.\d+)?))?\)$/);

if (!parts) {
DebugMsg(DebugLevel.ERROR, "Invalid color format");
DebugMsg(DebugLevel.WARN, "Invalid color format");
throw new Error("Invalid color format");
}

Expand Down Expand Up @@ -624,21 +624,21 @@ export class TagRoutesView extends ItemView {
this.hoveredNodesLinks.forEach(link => this.highlightLinks.add(link));


DebugMsg(DebugLevel.INFO,"update highlight entered")
DebugMsg(DebugLevel.DEBUG,"update highlight entered")

DebugMsg(DebugLevel.DEBUG,"selected node:", this.selectedNode)
DebugMsg(DebugLevel.DEBUG,"selected nodes:", this.selectedNodes)
DebugMsg(DebugLevel.DEBUG,"hovered node:", this.hoverNode)
DebugMsg(DebugLevel.DEBUG, "hovered nodes:", this.hoveredNodes)
DebugMsg(DebugLevel.DEBUG, "highlight nodes:", this.highlightNodes)

this.Graph.graphData().nodes.forEach((node: ExtendedNodeObject) => {
/* this.Graph.graphData().nodes.forEach((node: ExtendedNodeObject) => {
if (!(node as any).__threeObj) {
// this.Graph.graphData(this.gData);
DebugMsg(DebugLevel.ERROR,"no mesh found");
}
})
}) */
// update nodes visibility
this.Graph.graphData().nodes.forEach((node: ExtendedNodeObject) => {
const obj = node._ThreeMesh; // 获取节点的 Three.js 对象
Expand Down Expand Up @@ -677,14 +677,14 @@ export class TagRoutesView extends ItemView {
if (showSpriteText && node._Sprite) {
node._Sprite.visible = true;
node._Sprite.textHeight = 18;
}else {
}/* else {
DebugMsg(DebugLevel.ERROR,"node found but no sprite text found", this.highlightNodes)
}
} */
}

}
);
DebugMsg(DebugLevel.INFO,"update highlight before exit")
DebugMsg(DebugLevel.DEBUG,"update highlight before exit")

/* if (this.hoverNode && this.hoverNode._Sprite) {
this.hoverNode._Sprite.visible = true;
Expand Down Expand Up @@ -1508,7 +1508,7 @@ export class TagRoutesView extends ItemView {
node.y + dir.y * distance,
node.z + dir.z * distance
);
DebugMsg(DebugLevel.WARN,"Camera new position: ", targetPoint); // 输出目标点的坐标
DebugMsg(DebugLevel.DEBUG,"Camera new position: ", targetPoint); // 输出目标点的坐标
this.Graph.cameraPosition(
targetPoint, // new position
{ x: node.x ?? 0, y: node.y ?? 0, z: node.z ?? 0 },
Expand Down

0 comments on commit 448c447

Please sign in to comment.