Merge pull request #10000 from KaiVolland/jsdoc-changes

Adopt JSDoc annotations to allow '.d.ts' generation
This commit is contained in:
Tim Schaub
2019-09-25 16:26:24 +02:00
committed by GitHub
3 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ import FormatType from './format/FormatType.js';
/** /**
* *
* @type {boolean} withCredentials Compare https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/ * @type {boolean}
* @private * @private
*/ */
let withCredentials = false; let withCredentials = false;
-1
View File
@@ -8,7 +8,6 @@ import LRUCache from '../../structs/LRUCache.js';
/** /**
* @classdesc * @classdesc
* Cache of pre-rendered labels. * Cache of pre-rendered labels.
* @fires import("../events/Event.js").Event
*/ */
class LabelCache extends LRUCache { class LabelCache extends LRUCache {
+13 -12
View File
@@ -14,18 +14,19 @@ import TextPlacement from '../../style/TextPlacement.js';
* @const * @const
* @enum {number} * @enum {number}
*/ */
export const TEXT_ALIGN = {}; export const TEXT_ALIGN = {
TEXT_ALIGN['left'] = 0; 'left': 0,
TEXT_ALIGN['end'] = 0; 'end': 0,
TEXT_ALIGN['center'] = 0.5; 'center': 0.5,
TEXT_ALIGN['right'] = 1; 'right': 1,
TEXT_ALIGN['start'] = 1; 'start': 1,
TEXT_ALIGN['top'] = 0; 'top': 0,
TEXT_ALIGN['middle'] = 0.5; 'middle': 0.5,
TEXT_ALIGN['hanging'] = 0.2; 'hanging': 0.2,
TEXT_ALIGN['alphabetic'] = 0.8; 'alphabetic': 0.8,
TEXT_ALIGN['ideographic'] = 0.8; 'ideographic': 0.8,
TEXT_ALIGN['bottom'] = 1; 'bottom': 1
};
class CanvasTextBuilder extends CanvasBuilder { class CanvasTextBuilder extends CanvasBuilder {