diff --git a/package.json b/package.json index c082589..5ec4a2d 100644 --- a/package.json +++ b/package.json @@ -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": { @@ -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", diff --git a/src/components/Map.ts b/src/components/Map.ts index 937970d..c8a2b84 100644 --- a/src/components/Map.ts +++ b/src/components/Map.ts @@ -139,12 +139,12 @@ export class Map extends Component { 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}%`; } diff --git a/src/components/__tests__/Map.spec.ts b/src/components/__tests__/Map.spec.ts index 5d37012..7f66662 100644 --- a/src/components/__tests__/Map.spec.ts +++ b/src/components/__tests__/Map.spec.ts @@ -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 }, @@ -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 }, diff --git a/src/package.xml b/src/package.xml index b84f7b1..cb55936 100644 --- a/src/package.xml +++ b/src/package.xml @@ -1,6 +1,6 @@ - +