Skip to content

Commit

Permalink
fix errors in prepareLayer and update version
Browse files Browse the repository at this point in the history
  • Loading branch information
leoneljdias committed Oct 8, 2020
1 parent 6e7e052 commit 6535723
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 23 deletions.
17 changes: 1 addition & 16 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,4 @@ jobs:
- run: npm ci
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

publish-gpr:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
registry-url: https://npm.pkg.github.com/
scope: '@triedeti'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@triedeti/threedigitaltwin",
"version": "1.0.11",
"version": "1.0.12",
"main": "dist/threedigitaltwin.js",
"scripts": {
"build": "npm install"
Expand Down Expand Up @@ -36,4 +36,4 @@
"url": "https://github.com/triedeti/ThreeDigitalTwin/issues"
},
"homepage": "https://github.com/triedeti/ThreeDigitalTwin#readme"
}
}
17 changes: 13 additions & 4 deletions src/threedigitaltwin.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,19 @@ export default class ThreeDigitalTwin {
"features": [feature],
};
if (feature.properties.asset_type_configuration) {
prop.depth = feature.properties.asset_type_configuration.options_extrudeSettings_depth;
prop.altitude = feature.properties.asset_type_configuration.options_altitude;
prop.material.color = feature.properties.asset_type_configuration.options_material_color.substring(0, 7);
prop.material.opacity = feature.properties.asset_type_configuration.options_material_opacity;

if (feature.properties.asset_type_configuration.options_extrudeSettings_depth)
prop.depth = feature.properties.asset_type_configuration.options_extrudeSettings_depth;

if (feature.properties.asset_type_configuration.options_altitude)
prop.altitude = feature.properties.asset_type_configuration.options_altitude;

if (feature.properties.asset_type_configuration.options_material_color)
prop.material.color = feature.properties.asset_type_configuration.options_material_color.substring(0, 7);

if (feature.properties.asset_type_configuration.options_material_opacity)
prop.material.opacity = feature.properties.asset_type_configuration.options_material_opacity;

this.loadLayer(layerCode, geojson_feature, prop, outline);
} else {
this.loadLayer(layerCode, geojson_feature, properties, outline);
Expand Down

0 comments on commit 6535723

Please sign in to comment.