      1 /*
      2     Copyright 2008-2023
      3         Matthias Ehmann,
      4         Carsten Miller,
      5         Alfred Wassermann
      6
      7     This file is part of JSXGraph.
      8
      9     JSXGraph is free software dual licensed under the GNU LGPL or MIT License.
     10
     11     You can redistribute it and/or modify it under the terms of the
     12
     13       * GNU Lesser General Public License as published by
     14         the Free Software Foundation, either version 3 of the License, or
     15         (at your option) any later version
     16       OR
     17       * MIT License: https://github.com/jsxgraph/jsxgraph/blob/master/LICENSE.MIT
     18
     19     JSXGraph is distributed in the hope that it will be useful,
     20     but WITHOUT ANY WARRANTY; without even the implied warranty of
     21     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     22     GNU Lesser General Public License for more details.
     23
     24     You should have received a copy of the GNU Lesser General Public License and
     25     the MIT License along with JSXGraph. If not, see <https://www.gnu.org/licenses/>
     26     and <https://opensource.org/licenses/MIT/>.
     27  */
     28 import JXG from "../jxg";
     29
     30 // Constants for this theme:
     31 let size = 0.75,
     32     color = '#000';
     33
     34 JXG.themes['mono_thin'] = {
     35
     36         board: {
     37             showInfobox: false,
     38             showCopyright: true,
     39             defaultAxes: {
     40                 x: {
     41                     ticks: {
     42                         minorTicks: 0,
     43                         majorHeight: 10,
     44                         majorTickEndings: [1, 0]
     45                     }
     46                 },
     47                 y: {
     48                     ticks: {
     49                         minorTicks: 0,
     50                         majorHeight: 10,
     51                         majorTickEndings: [0, 1]
     52                     }
     53                 }
     54             }
     55         },
     56
     57         navbar: {
     58             strokeColor: '#bbb',
     59             fillColor: 'none'
     60         },
     61
     62         elements: {
     63             strokeColor: color,
     64             highlightStrokeColor: color,
     65             fillColor: 'none',
     66             highlightFillColor: 'none',
     67             strokeOpacity: 0.6,
     68             highlightStrokeOpacity: 1
     69         },
     70
     71         angle: {
     72             strokeColor: color,
     73             fillColor: '#aaaaaa55',
     74             fillOpacity: 0.3,
     75             highlightFillColor: '#aaaaaa33',
     76             highlightFillOpacity: 0.3,
     77             label: {
     78                 strokeColor: color
     79             }
     80         },
     81
     82         arc: {
     83             strokeColor: color,
     84             strokeWidth: size,
     85             highlightStrokeColor: color,
     86             highlightStrokeWidth: size
     87         },
     88
     89         axis: {
     90             // ticks: {
     91             //     strokeColor: '#bbb'
     92             // }
     93         },
     94
     95         boxplot: {
     96             strokeWidth: size,
     97             strokeColor: color,
     98             fillColor: color,
     99             fillOpacity: 0.2,
    100             highlightStrokeWidth: size,
    101             highlightStrokeColor: color,
    102             highlightFillColor: color,
    103             highlightFillOpacity: 0.1
    104         },
    105
    106         circle: {
    107             strokeWidth: size,
    108             highlightStrokeWidth: 1.5 * size,
    109             strokeColor: color,
    110             highlightFillColor: 'none',
    111             highlightStrokeColor: color,
    112             center: {
    113                 size: size,
    114                 fillColor: color,
    115                 strokeColor: color,
    116                 highlightStrokeWidth: 4 * size,
    117                 highlightFillColor: color,
    118                 highlightStrokeColor: color
    119             },
    120             point2: {
    121                 size: size,
    122                 fillColor: color,
    123                 strokeColor: color,
    124                 highlightStrokeWidth: 4 * size,
    125                 highlightFillColor: color,
    126                 highlightStrokeColor: color
    127             }
    128         },
    129
    130         circumcircle: {
    131             strokeWidth: size,
    132             highlightStrokeWidth: 1.5 * size,
    133             strokeColor: color,
    134             highlightFillColor: 'none',
    135             highlightStrokeColor: color,
    136             center: {
    137                 size: size,
    138                 fillColor: color,
    139                 strokeColor: color,
    140                 highlightStrokeWidth: 4 * size,
    141                 highlightFillColor: color,
    142                 highlightStrokeColor: color
    143             }
    144         },
    145
    146         circumcirclearc: {
    147             strokeColor: color,
    148             strokeWidth: size,
    149             highlightStrokeColor: color,
    150             highlightStrokeWidth: size
    151         },
    152
    153         circumcirclesector: {
    154             strokeColor: color,
    155             fillColor: '#aaaaaa55',
    156             fillOpacity: 0.3,
    157             highlightFillColor: '#aaaaaa33',
    158             highlightFillOpacity: 0.3
    159         },
    160
    161         comb: {
    162             strokeColor: color,
    163             strokeWidth: size
    164         },
    165
    166         conic: {
    167             strokeWidth: size,
    168             highlightStrokeWidth: 1.5 * size,
    169             strokeColor: color,
    170             highlightStrokeColor: color,
    171             fillColor: 'none',
    172             highlightFillColor: 'none'
    173         },
    174
    175         curve: {
    176             strokeColor: color,
    177             strokeWidth: size,
    178             highlightStrokeColor: color,
    179             highlightStrokeWidth: size
    180         },
    181
    182         grid: {
    183             strokeWidth: size
    184         },
    185
    186         hatch: {
    187             strokeColor: color,
    188             strokeWidth: size
    189         },
    190
    191         incircle: {
    192             strokeWidth: size,
    193             highlightStrokeWidth: 1.5 * size,
    194             strokeColor: color,
    195             highlightFillColor: 'none',
    196             highlightStrokeColor: color,
    197             center: {
    198                 size: size,
    199                 fillColor: color,
    200                 strokeColor: color,
    201                 highlightStrokeWidth: 4 * size,
    202                 highlightFillColor: color,
    203                 highlightStrokeColor: color
    204             }
    205         },
    206
    207         inequality: {
    208             fillColor: '#aaaaaa55',
    209             fillOpacity: 0.2
    210         },
    211
    212         label: {
    213             strokeColor: color
    214         },
    215
    216         line: {
    217             strokeColor: color,
    218             strokeWidth: size,
    219             highlightStrokeColor: color,
    220             highlightStrokeWidth: size,
    221             point1: {
    222                 size: size,
    223                 fillColor: color,
    224                 strokeColor: color,
    225                 highlightStrokeWidth: 4 * size,
    226                 highlightFillColor: color,
    227                 highlightStrokeColor: color
    228             },
    229             point2: {
    230                 size: size,
    231                 fillColor: color,
    232                 strokeColor: color,
    233                 highlightStrokeWidth: 4 * size,
    234                 highlightFillColor: color,
    235                 highlightStrokeColor: color
    236             }
    237         },
    238
    239         normal: {
    240             strokeColor: color
    241         },
    242
    243         parallel: {
    244             strokeColor: color
    245         },
    246
    247         perpendicular: {
    248             strokeColor: color
    249         },
    250
    251         perpendicularsegment: {
    252             strokeColor: color
    253         },
    254
    255         point: {
    256             size: size,
    257             fillColor: color,
    258             strokeColor: color,
    259             highlightStrokeWidth: 4 * size,
    260             highlightFillColor: color,
    261             highlightStrokeColor: color
    262         },
    263
    264         polygon: {
    265             fillColor: '#aaaaaa55',
    266             highlightFillColor: '#aaaaaa33',
    267             fillOpacity: 0.3,
    268             highlightFillOpacity: 0.3,
    269             vertices: {
    270                 size: size,
    271                 fillColor: color,
    272                 strokeColor: color,
    273                 highlightStrokeWidth: 4 * size,
    274                 highlightFillColor: color,
    275                 highlightStrokeColor: color
    276             },
    277             borders: {
    278                 strokeColor: color,
    279                 strokeWidth: size,
    280                 highlightStrokeColor: color,
    281                 highlightStrokeWidth: size
    282             }
    283         },
    284
    285         sector: {
    286             strokeColor: color,
    287             fillColor: '#aaaaaa55',
    288             fillOpacity: 0.3,
    289             highlightFillColor: '#aaaaaa33',
    290             highlightFillOpacity: 0.3
    291         },
    292
    293         semicircle: {
    294             center: {
    295                 size: size,
    296                 fillColor: color,
    297                 strokeColor: color,
    298                 highlightStrokeWidth: 4 * size,
    299                 highlightFillColor: color,
    300                 highlightStrokeColor: color
    301             }
    302         },
    303
    304         slider: {
    305             size: size,
    306             fillColor: color,
    307             strokeColor: color,
    308             highlightStrokeWidth: 4 * size,
    309             highlightFillColor: color,
    310             highlightStrokeColor: color,
    311             baseline: {
    312                 strokeWidth: size,
    313                 strokeColor: color,
    314                 highlightStrokeColor: color
    315             },
    316             label: {
    317                 strokeColor: color
    318             },
    319             highline: {
    320                 strokeWidth: 3 * size,
    321                 name: '',
    322                 strokeColor: color,
    323                 highlightStrokeColor: color
    324             },
    325             ticks: {
    326                 strokeColor: color
    327             }
    328         },
    329
    330         slopefield: {
    331             strokeWidth: 0.75 * size,
    332             highlightStrokeWidth: size,
    333             highlightStrokeColor: color,
    334             highlightStrokeOpacity: 0.8
    335         },
    336
    337         tapemeasure: {
    338             strokeColor: color,
    339             strokeWidth: size,
    340             highlightStrokeColor: color,
    341             highlightStrokeWidth: size,
    342             point1: {
    343                 size: size,
    344                 fillColor: color,
    345                 strokeColor: color,
    346                 highlightStrokeWidth: 4 * size,
    347                 highlightFillColor: color,
    348                 highlightStrokeColor: color
    349             },
    350             point2: {
    351                 size: size,
    352                 fillColor: color,
    353                 strokeColor: color,
    354                 highlightStrokeWidth: 4 * size,
    355                 highlightFillColor: color,
    356                 highlightStrokeColor: color
    357             },
    358             ticks: {
    359                 strokeWidth: size
    360             }
    361         },
    362
    363         text: {
    364             strokeColor: color
    365         },
    366
    367         tracecurve: {
    368             strokeColor: color
    369         },
    370
    371         turtle: {
    372             strokeWidth: size,
    373             strokeColor: color,
    374             arrow: {
    375                 strokeWidth: 2 * size,
    376                 strokeColor: '#aaaaaa55'
    377             }
    378         },
    379
    380         vectorfield: {
    381             strokeWidth: 0.75 * size,
    382             highlightStrokeWidth: size,
    383             highlightStrokeColor: color,
    384             highlightStrokeOpacity: 0.8
    385         }
    386     // });
    387 };
    388
    389 export default JXG;