Constant, build, regen test

This commit is contained in:
Kristian Valind
2022-04-18 10:32:30 +00:00
parent 11e698c678
commit 7981276693
8 changed files with 41 additions and 19 deletions
Generated Vendored
+19
View File
@@ -5565,6 +5565,11 @@ var Helper = /** @class */ (function () {
HIGHANSI: "hich",
DOUBLE: "dbch",
};
Helper.SUPERSUBSCRIPT = {
SUPERSCRIPT: 1,
NONE: 0,
SUBSCRIPT: -1,
};
Helper._A = "A".charCodeAt(0);
Helper._a = "a".charCodeAt(0);
Helper._F = "F".charCodeAt(0);
@@ -5688,6 +5693,7 @@ var Chp = /** @class */ (function () {
this.highlightindex = parent.highlightindex;
this.fontsize = parent.fontsize;
this.fontfamily = parent.fontfamily;
this.supersubscript = parent.supersubscript;
}
else {
this.bold = false;
@@ -5698,6 +5704,7 @@ var Chp = /** @class */ (function () {
this.colorindex = 0;
this.highlightindex = 0;
this.fontsize = 24;
this.supersubscript = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.SUPERSUBSCRIPT.NONE;
}
}
return Chp;
@@ -7945,6 +7952,9 @@ var RtfDestination = /** @class */ (function (_super) {
},
b: _this._genericFormatOnOff("chp", "bold"),
i: _this._genericFormatOnOff("chp", "italic"),
sub: _this._genericFormatSetVal("chp", "supersubscript", -1),
super: _this._genericFormatSetVal("chp", "supersubscript", 1),
nosupersub: _this._genericFormatSetVal("chp", "supersubscript", 0),
cf: _this._genericFormatSetValRequired("chp", "colorindex"),
highlight: _this._genericFormatSetValRequired("chp", "highlightindex"),
fs: _this._genericFormatSetValRequired("chp", "fontsize"),
@@ -8357,6 +8367,15 @@ var RenderChp = /** @class */ (function () {
}
}
el.style.fontSize = Math.floor(this._chp.fontsize / 2) + "pt";
if (this._chp.supersubscript === _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.SUPERSUBSCRIPT.SUPERSCRIPT) {
el.style.verticalAlign = "super";
}
else if (this._chp.supersubscript === _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.SUPERSUBSCRIPT.SUBSCRIPT) {
el.style.verticalAlign = "sub";
}
if (this._chp.supersubscript === _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.SUPERSUBSCRIPT.SUPERSCRIPT || this._chp.supersubscript === _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.SUPERSUBSCRIPT.SUBSCRIPT) {
el.style.fontSize = Math.floor((this._chp.fontsize / 2) - 2) + "pt";
}
};
return RenderChp;
}());
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+5
View File
@@ -90,6 +90,11 @@ export class Helper {
HIGHANSI: "hich",
DOUBLE: "dbch",
};
public static SUPERSUBSCRIPT = {
SUPERSCRIPT: 1,
NONE: 0,
SUBSCRIPT: -1,
};
public static log(message: string): void {
if (isLoggingEnabled) {
+2 -2
View File
@@ -51,7 +51,7 @@ export class Chp {
this.highlightindex = parent.highlightindex;
this.fontsize = parent.fontsize;
this.fontfamily = parent.fontfamily;
this.supersubscript = parent.supersubscript
this.supersubscript = parent.supersubscript;
} else {
this.bold = false;
this.underline = Helper.UNDERLINE.NONE;
@@ -61,7 +61,7 @@ export class Chp {
this.colorindex = 0;
this.highlightindex = 0;
this.fontsize = 24;
this.supersubscript = 0;
this.supersubscript = Helper.SUPERSUBSCRIPT.NONE;
}
}
}
+3 -3
View File
@@ -76,13 +76,13 @@ export class RenderChp {
}
el.style.fontSize = Math.floor(this._chp.fontsize / 2) + "pt";
if (this._chp.supersubscript === 1) {
if (this._chp.supersubscript === Helper.SUPERSUBSCRIPT.SUPERSCRIPT) {
el.style.verticalAlign = "super"
} else if (this._chp.supersubscript === -1) {
} else if (this._chp.supersubscript === Helper.SUPERSUBSCRIPT.SUBSCRIPT) {
el.style.verticalAlign = "sub"
}
if (this._chp.supersubscript === 1 || this._chp.supersubscript === -1) {
if (this._chp.supersubscript === Helper.SUPERSUBSCRIPT.SUPERSCRIPT || this._chp.supersubscript === Helper.SUPERSUBSCRIPT.SUBSCRIPT) {
el.style.fontSize = Math.floor((this._chp.fontsize / 2) - 2) + "pt"
}
}
@@ -1,12 +1,10 @@
<div style="min-height: 12pt; text-align: left;">
<span style="font-family: Helvetica; font-size: 12pt;">Normal
</span>
<span style="font-family: Helvetica; vertical-align: super; font-size: 10pt;">
super
</span>
<span style="font-family: Helvetica; vertical-align: sub; font-size: 10pt;">
sub
</span>
<span style="font-family: Helvetica; font-size: 12pt;"> and normal once again.
</span>
</div>
<span style="font-family: Helvetica; font-size: 12pt;">Normal
</span>
<span style="font-family: Helvetica; font-size: 10pt; vertical-align: super;">super
</span>
<span style="font-family: Helvetica; font-size: 10pt; vertical-align: sub;">sub
</span>
<span style="font-family: Helvetica; font-size: 12pt;"> and normal once again.
</span>
</div>