Skip to content

Commit

Permalink
JSDoc for StyleContext
Browse files Browse the repository at this point in the history
  • Loading branch information
ftoromanoff committed Oct 26, 2023
1 parent 565362d commit cacf832
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"FeatureBuildingOptions",
"Style",
"StyleOptions",
"StyleContext",
"Label"
],

Expand Down
19 changes: 18 additions & 1 deletion src/Core/Style.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,29 @@ function defineStyleProperty(style, category, name, value, defaultValue) {
style[category][name] = value;
}

/**
* @class
* @classdesc StyleContext is a class to store all informations
* about context to generate the style of each FeatureGeometry.
*
* @property {Coordinates} worldCoord @private Coordinates of the FeatureGeometry in world system.
* @property {Coordinates} localCoordinates @private Are the coordinates systeme origin local or global.
* @property {Feature} feature @private
* @property {FeatureGeometry} geometry @private
* @property {Object} globals
* @property {Object} collections
* @property {Number} type
* @property {Coordinates} coordinates
*/

export class StyleContext {
#worldCoord = new Coordinates('EPSG:4326', 0, 0, 0);
#localCoordinates = new Coordinates('EPSG:4326', 0, 0, 0);
#feature = {};
#geometry = {};

/**
* @constructor
*/
constructor() {
this.globals = {};
}
Expand Down

0 comments on commit cacf832

Please sign in to comment.