local storage of the custom layers

This commit is contained in:
arp 2020-10-20 17:22:32 +02:00
parent f5aa70ddc2
commit dff189b223
2 changed files with 15 additions and 19 deletions

View file

@ -25,10 +25,10 @@ class LocalUserStore {
return parseInt(window.localStorage.getItem('selectedPlayer') || '');
}
setCustomCursorPosition(x:number, y:number, selectedLayers: number[]): void {
window.localStorage.setItem('customCursorPosition', JSON.stringify({x, y, selectedLayers}));
setCustomCursorPosition(activeRow:number, selectedLayers: number[]): void {
window.localStorage.setItem('customCursorPosition', JSON.stringify({activeRow, selectedLayers}));
}
getCustomCursorPosition(): {x:number, y:number, selectedLayers:number[]}|null {
getCustomCursorPosition(): {activeRow:number, selectedLayers:number[]}|null {
return JSON.parse(window.localStorage.getItem('customCursorPosition') || "null");
}
}