Enable minRuleThickness in rendering options (#1964)

* Enable minRuleThickness in rendering options

* fix typo

* Fix lint errors

* Fix default

* Remove border from \colorbox

* Fix lint error

* Update array screenshot

* Add border to \fcolorbox

* Edit comment

* Add comment

* Pick up review comments

* Fix lint errors

* Edit \sqrt screenshot test

* Update screenshots

* Screenshot update take 2

* Improve \sqrt SVG paths

* Fix lint error
This commit is contained in:
Ron Kok
2019-05-25 15:39:16 -07:00
committed by Kevin Barabash
parent 17e89efdfc
commit f9dafea6a6
19 changed files with 236 additions and 103 deletions

View File

@@ -24,6 +24,7 @@ export type SettingsOptions = {
throwOnError?: boolean;
errorColor?: string;
macros?: MacroMap;
minRuleThickness?: number;
colorIsTextColor?: boolean;
strict?: boolean | "ignore" | "warn" | "error" | StrictFunction;
maxSize?: number;
@@ -49,6 +50,7 @@ class Settings {
throwOnError: boolean;
errorColor: string;
macros: MacroMap;
minRuleThickness: number;
colorIsTextColor: boolean;
strict: boolean | "ignore" | "warn" | "error" | StrictFunction;
maxSize: number;
@@ -65,6 +67,10 @@ class Settings {
this.throwOnError = utils.deflt(options.throwOnError, true);
this.errorColor = utils.deflt(options.errorColor, "#cc0000");
this.macros = options.macros || {};
this.minRuleThickness = Math.max(
0,
utils.deflt(options.minRuleThickness, 0)
);
this.colorIsTextColor = utils.deflt(options.colorIsTextColor, false);
this.strict = utils.deflt(options.strict, "warn");
this.maxSize = Math.max(0, utils.deflt(options.maxSize, Infinity));