tiberiuzuld / angular-gridster2

Angular gridster 2
https://tiberiuzuld.github.io/angular-gridster2
MIT License
1.28k stars 376 forks source link

Map takes only 40% of width when Placed inside Gridster #419

Open DBHATT014 opened 6 years ago

DBHATT014 commented 6 years ago

I am using angular-gridster2 to render ng-mapbox-gl map , which renders map 40 % width of container . When i used it outside of gridster2( in saparate component ) then it working fine . Please suggest any solution .

and the html is: <mgl-map [style]="'mapbox://styles/mapbox/streets-v9'" [zoom]="[defaultZoomLevel]" [center]="[defaultLongitude, defaultLatitude]" [trackResize]="true" >

tiberiuzuld commented 5 years ago

Try to set width and height 100% on the map element and use some kind of resize update on ng-mapbox-gl when the gridster-item updates size