Skip to content

Commit

Permalink
fix wind vector display issue
Browse files Browse the repository at this point in the history
  • Loading branch information
panaaj committed Sep 15, 2021
1 parent 5f5e84d commit 11cd0b0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG: Freeboard

### v1.18.2

- **Fix**: Vessel wind vector lines not being displayed.


### v1.18.1

- **Fix**: Remove offset to Openlayers chart max zoom.
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": "@signalk/freeboard-sk",
"version": "1.18.1",
"version": "1.18.2",
"description": "Openlayers chartplotter implementation for Signal K",
"keywords": [
"signalk-webapp",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export class SKVesselsLayerComponent implements OnInit, OnDestroy, OnChanges {
return;
}

let windc= destCoordinate( target.position, windDirection, this.zoomOffsetLevel[this.mapZoom]);
let windc= destCoordinate( target.position, windDirection, this.zoomOffsetLevel[Math.floor(this.mapZoom)]);
if(wf) { // update vector
wf.setGeometry( new LineString( [
fromLonLat(target.position),
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class AppInfo extends Info {
this.name= "Freeboard";
this.shortName= "freeboard";
this.description= `Signal K Chart Plotter.`;
this.version= '1.18.1';
this.version= '1.18.2';
this.url= 'https://github.com/signalk/freeboard-sk';
this.logo= "./assets/img/app_logo.png";

Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/map/fb-map.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ export class FBMapComponent implements OnInit, OnDestroy {

public drawVesselLines(vesselUpdate:boolean=false) {
let z= this.fbMap.zoomLevel;
let offset= (z<29) ? this.zoomOffsetLevel[z] : 60;
let offset= (z<29) ? this.zoomOffsetLevel[Math.floor(z)] : 60;
let wMax= 10; // ** max line length

let vl= {
Expand Down

0 comments on commit 11cd0b0

Please sign in to comment.