Skip to content

Commit aa67be0

Browse files
authored
Merge fix/absoluteHeight
2 parents 6ae695e + 4639316 commit aa67be0

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "google-maps",
33
"widgetName": "GoogleMaps",
4-
"version": "1.4.0",
4+
"version": "1.4.1",
55
"description": "Show locations on Google Maps",
66
"copyright": "Mendix BV",
77
"scripts": {
@@ -42,8 +42,8 @@
4242
"@types/googlemaps": "^3.26.4",
4343
"@types/jasmine": "^2.5.45",
4444
"@types/karma": "^0.13.33",
45-
"@types/react": "^16.0.0",
46-
"@types/react-dom": "^15.5.1",
45+
"@types/react": "^15.6.1",
46+
"@types/react-dom": "^15.5.4",
4747
"check-dependencies": "^1.0.1",
4848
"clean-webpack-plugin": "^0.1.16",
4949
"copy-webpack-plugin": "^4.0.1",

src/components/Map.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,12 @@ export class Map extends Component<MapProps, MapState> {
139139

140140
private getStyle(): object {
141141
const style: CSSProperties = {
142-
width: this.props.widthUnit === "percentage" ? `${this.props.width}%` : `${this.props.width}`
142+
width: this.props.widthUnit === "percentage" ? `${this.props.width}%` : `${this.props.width}px`
143143
};
144144
if (this.props.heightUnit === "percentageOfWidth") {
145145
style.paddingBottom = `${this.props.height}%`;
146146
} else if (this.props.heightUnit === "pixels") {
147-
style.paddingBottom = `${this.props.height}`;
147+
style.paddingBottom = `${this.props.height}px`;
148148
} else if (this.props.heightUnit === "percentageOfParent") {
149149
style.height = `${this.props.height}%`;
150150
}

src/components/__tests__/Map.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ describe("Map", () => {
8181

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

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

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

110110
expect(map).toBeElement(
111111
createElement("div", { className: "widget-google-maps-wrapper", style },

src/package.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<package xmlns="http://www.mendix.com/package/1.0/">
3-
<clientModule name="GoogleMaps" version="1.4.0" xmlns="http://www.mendix.com/clientModule/1.0/">
3+
<clientModule name="GoogleMaps" version="1.4.1" xmlns="http://www.mendix.com/clientModule/1.0/">
44
<widgetFiles>
55
<widgetFile path="GoogleMaps.xml"/>
66
<widgetFile path="GoogleMapsContext.xml"/>

0 commit comments

Comments
 (0)