MapComplete/src/UI/Studio/StudioHashSetter.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
393 B
TypeScript
Raw Normal View History

2024-04-28 00:23:20 +02:00
import { Store, UIEventSource } from "../../Logic/UIEventSource"
import Hash from "../../Logic/Web/Hash"
export default class StudioHashSetter {
constructor(mode: "layer" | "theme", tab: Store<number>, name: Store<string>) {
2024-06-16 16:06:26 +02:00
tab.mapD(
(tab) => {
2024-04-28 00:23:20 +02:00
Hash.hash.setData(mode + "/" + name.data + "/" + tab)
2024-06-16 16:06:26 +02:00
},
[name]
)
2024-04-28 00:23:20 +02:00
}
}