Skip to content

Commit

Permalink
Merge fix/absoluteHeight
Browse files Browse the repository at this point in the history
  • Loading branch information
Andries-Smit authored Oct 6, 2017
2 parents 6ae695e + 4639316 commit aa67be0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "google-maps",
"widgetName": "GoogleMaps",
"version": "1.4.0",
"version": "1.4.1",
"description": "Show locations on Google Maps",
"copyright": "Mendix BV",
"scripts": {
Expand Down Expand Up @@ -42,8 +42,8 @@
"@types/googlemaps": "^3.26.4",
"@types/jasmine": "^2.5.45",
"@types/karma": "^0.13.33",
"@types/react": "^16.0.0",
"@types/react-dom": "^15.5.1",
"@types/react": "^15.6.1",
"@types/react-dom": "^15.5.4",
"check-dependencies": "^1.0.1",
"clean-webpack-plugin": "^0.1.16",
"copy-webpack-plugin": "^4.0.1",
Expand Down
4 changes: 2 additions & 2 deletions src/components/Map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ export class Map extends Component<MapProps, MapState> {

private getStyle(): object {
const style: CSSProperties = {
width: this.props.widthUnit === "percentage" ? `${this.props.width}%` : `${this.props.width}`
width: this.props.widthUnit === "percentage" ? `${this.props.width}%` : `${this.props.width}px`
};
if (this.props.heightUnit === "percentageOfWidth") {
style.paddingBottom = `${this.props.height}%`;
} else if (this.props.heightUnit === "pixels") {
style.paddingBottom = `${this.props.height}`;
style.paddingBottom = `${this.props.height}px`;
} else if (this.props.heightUnit === "percentageOfParent") {
style.height = `${this.props.height}%`;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/__tests__/Map.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe("Map", () => {

it("should render a structure correctly with pixels", () => {
const map = setUpMap([ { address } ], undefined, 100, 75, "pixels", "pixels");
const style = { paddingBottom: "75", width: "100" };
const style = { paddingBottom: "75px", width: "100px" };

expect(map).toBeElement(
createElement("div", { className: "widget-google-maps-wrapper", style },
Expand All @@ -105,7 +105,7 @@ describe("Map", () => {

it("should render a structure correctly with percentage", () => {
const map = setUpMap([ { address } ], undefined, 20, 30, "percentage", "pixels");
const style = { width: "20%", paddingBottom: "30" };
const style = { width: "20%", paddingBottom: "30px" };

expect(map).toBeElement(
createElement("div", { className: "widget-google-maps-wrapper", style },
Expand Down
2 changes: 1 addition & 1 deletion src/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="GoogleMaps" version="1.4.0" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="GoogleMaps" version="1.4.1" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="GoogleMaps.xml"/>
<widgetFile path="GoogleMapsContext.xml"/>
Expand Down

0 comments on commit aa67be0

Please sign in to comment.