Skip to content

Commit

Permalink
3.0.9 bug fix for 3.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbarela committed Jan 13, 2021
1 parent aa2b8a0 commit d2c9f67
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ The GeoPackage JavaScript library currently provides the ability to read GeoPack

### Changelog

##### 3.0.9

- Bug fix for null colors

##### 3.0.8

- If a null color is set on the FeatureTiles class, the color will be reset to the initial default of #000000FF
Expand Down
8 changes: 7 additions & 1 deletion lib/tiles/features/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ export class FeatureTiles {
public maxFeaturesTileDraw: CustomFeaturesTile = null;
widthOverlap: number;
heightOverlap: number;
private _defaultStroke = '#000000FF';
private _defaultFill = '#00000011';
constructor(
public featureDao: FeatureDao<FeatureRow>,
public tileWidth: number = 256,
Expand All @@ -77,7 +79,7 @@ export class FeatureTiles {
this.projection = featureDao.projection;
this.linePaint.strokeWidth = 2.0;
this.polygonPaint.strokeWidth = 2.0;
this.polygonFillPaint.color = '#00000011';
this.polygonFillPaint.color = this._defaultFill;
this.geoPackage = this.featureDao.geoPackage;
if (this.geoPackage != null) {
this.featureTableStyles = new FeatureTableStyles(this.geoPackage, featureDao.table);
Expand Down Expand Up @@ -390,6 +392,7 @@ export class FeatureTiles {
this._overrideGeoPackagePointPaint = true;
} else {
this._overrideGeoPackagePointPaint = false;
pointColor = this._defaultStroke;
}
this.pointPaint.color = pointColor;
}
Expand Down Expand Up @@ -429,6 +432,7 @@ export class FeatureTiles {
this._overrideGeoPackageLinePaint = true;
} else {
this._overrideGeoPackageLinePaint = false;
lineColor = this._defaultStroke;
}
this.linePaint.color = lineColor;
}
Expand Down Expand Up @@ -468,6 +472,7 @@ export class FeatureTiles {
this._overrideGeoPackagePolygonPaint = true;
} else {
this._overrideGeoPackagePolygonPaint = false;
polygonColor = this._defaultStroke;
}
this.polygonPaint.color = polygonColor;
}
Expand All @@ -487,6 +492,7 @@ export class FeatureTiles {
this._overrideGeoPackagePolygonFillPaint = true;
} else {
this._overrideGeoPackagePolygonFillPaint = false;
polygonFillColor = this._defaultFill;
}
this.polygonFillPaint.color = polygonFillColor;
}
Expand Down
3 changes: 0 additions & 3 deletions lib/tiles/features/paint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ export class Paint {
* @param {String} color String color in the format #RRGGBB or #RRGGBBAA
*/
set color(color: string) {
if (!color) {
color = '#000000FF';
}
this._color = color;
}
/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngageoint/geopackage",
"version": "3.0.8",
"version": "3.0.9",
"description": "GeoPackage JavaScript Library",
"keywords": [
"NGA",
Expand Down

0 comments on commit d2c9f67

Please sign in to comment.