MCPcopy Create free account
hub / github.com/Xallt/sync-graph-settings / setSettings

Method setSettings

main.ts:145–158  ·  view source on GitHub ↗
(localGraphLeaf: WorkspaceLeaf, colorGroups: any, searchFilters: any, closeSettings: any, lineSizeMultiplier: any, nodeSizeMultiplier: any, showTags: boolean)

Source from the content-addressed store, hash-verified

143 }
144
145 setSettings(localGraphLeaf: WorkspaceLeaf, colorGroups: any, searchFilters: any, closeSettings: any, lineSizeMultiplier: any, nodeSizeMultiplier: any, showTags: boolean) {
146 const viewState = localGraphLeaf.getViewState();
147 viewState.state.options.colorGroups = colorGroups;
148 viewState.state.options.search = searchFilters;
149 viewState.state.options.close = closeSettings;
150 viewState.state.options.lineSizeMultiplier = lineSizeMultiplier;
151 viewState.state.options.nodeSizeMultiplier = nodeSizeMultiplier;
152 viewState.state.options.showTags = showTags;
153 viewState.state.options.localJumps = this.settings.defaultDepth;
154 viewState.state.options.localBacklinks = this.settings.defaultIncomingLinks;
155 viewState.state.options.localForelinks = this.settings.defaultOutgoingLinks;
156 viewState.state.options.localInterlinks = this.settings.defaultNeighborLinks;
157 localGraphLeaf.setViewState(viewState);
158 }
159
160 async saveSettings() {
161 await this.saveData(this.settings);

Callers 1

syncGlobalToLocalMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected