MCPcopy
hub / github.com/CopyTranslator/CopyTranslator / enumerateLayouts

Method enumerateLayouts

src/main/controller.ts:66–77  ·  view source on GitHub ↗
(isLeft: boolean)

Source from the content-addressed store, hash-verified

64 }
65
66 enumerateLayouts(isLeft: boolean) {
67 const index = layoutTypes.findIndex(
68 (x) => x === this.config.get<LayoutType>("layoutType")
69 );
70 let newIndex: number;
71 if (isLeft) {
72 newIndex = (index + 1) % layoutTypes.length;
73 } else {
74 newIndex = (index + layoutTypes.length - 1) % layoutTypes.length;
75 }
76 this.set("layoutType", layoutTypes[newIndex]);
77 }
78
79 promptForName() {
80 const l = store.getters.locale;

Callers 1

handleMethod · 0.95

Calls 2

setMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected