Improve jsDoc and some naming

This commit is contained in:
Denis
2022-04-13 14:11:28 +02:00
parent e00e3a7b8e
commit 1850e16bde
3 changed files with 6 additions and 4 deletions
+2 -1
View File
@@ -946,7 +946,8 @@ class CanvasImmediateRenderer extends VectorContext {
const textAlign = textState.textAlign
? textState.textAlign
: defaultTextAlign;
// Ignore justification here, since rich-text and also `'\n'` make less sense for line placement.
// Ignore `textState.justify` here,
// since rich-text is not supported for the immediate rendering API.
if (!contextTextState) {
context.font = textState.font;
context.textAlign = /** @type {CanvasTextAlign} */ (textAlign);
+2 -1
View File
@@ -211,7 +211,8 @@ class CanvasTextBuilder extends CanvasBuilder {
}
this.beginGeometry(geometry, feature);
const textAlign = textState.textAlign;
// Ignore justification here, since rich-text and also `'\n'` make less sense for line placement.
// Ignore `textState.justify` here,
// since rich-text and also `'\n'` make less sense for line placement.
let flatOffset = 0;
let flatEnd;
for (let o = 0, oo = ends.length; o < oo; ++o) {