[READ-ONLY] Mirror of https://github.com/flo-bit/mandala. flo-bit.github.io/mandala/
0

Configure Feed

Select the types of activity you want to include in your feed.

small fixes

+15 -7
+2
Readme.md
··· 20 20 - [x] load file 21 21 - [x] export file as svg/png 22 22 23 + - [ ] save date with file 24 + 23 25 - [ ] help button 24 26 - [ ] add help modal
+13 -7
script.js
··· 420 420 this.maxBrushSize = 15; 421 421 this.minBrushSize = 0.2; 422 422 423 + this.files = []; 424 + 423 425 this.loadFiles(); 424 426 this.loadFile(); 425 427 ··· 672 674 673 675 loadFile(name) { 674 676 let json = localStorage.getItem(name ?? "current-project"); 677 + if (json === null) { 678 + this.setSettings(); 679 + return; 680 + } 675 681 let wrapper = JSON.parse(json); 676 682 677 683 paper.project.importJSON(wrapper.json); ··· 694 700 } 695 701 696 702 setSettings(settings) { 697 - this._simplify = settings.simplify ?? true; 698 - this._mirror = settings.mirror ?? true; 703 + this._simplify = settings?.simplify ?? true; 704 + this._mirror = settings?.mirror ?? true; 699 705 700 - this._brushColor = settings.brushColor ?? "#FF0000"; 706 + this._brushColor = settings?.brushColor ?? "#FF0000"; 701 707 702 - this._rotations = settings.rotations ?? 8; 708 + this._rotations = settings?.rotations ?? 8; 703 709 this.calculateRotationsPercentage(); 704 - this._brushSize = settings.brushSize ?? 1; 710 + this._brushSize = settings?.brushSize ?? 1; 705 711 this.calculateBrushSizePercentage(); 706 712 707 - this._backgroundColor = settings.backgroundColor ?? "#FFFFFF"; 708 - view.element.style.backgroundColor = this.backgroundColor; 713 + this._backgroundColor = settings?.backgroundColor ?? "#FFFFFF"; 714 + view.element.style.backgroundColor = this._backgroundColor; 709 715 710 716 updateUI(this); 711 717 }