Skip to content

Commit ea31338

Browse files
author
Spike Brehm
authored
Merge pull request #500 from stereodenis/patch-1
StyleSheet.absoluteFillObject
2 parents bc8084b + 9be72f1 commit ea31338

17 files changed

+32
-160
lines changed

docs/installation.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,22 +146,14 @@ If you have a blank map issue, ([#118](https://github.com/lelandrichardson/react
146146
...
147147
const styles = StyleSheet.create({
148148
container: {
149-
position: 'absolute',
150-
top: 0,
151-
left: 0,
152-
right: 0,
153-
bottom: 0,
149+
...StyleSheet.absoluteFillObject,
154150
height: 400,
155151
width: 400,
156152
justifyContent: 'flex-end',
157153
alignItems: 'center',
158154
},
159155
map: {
160-
position: 'absolute',
161-
top: 0,
162-
left: 0,
163-
right: 0,
164-
bottom: 0,
156+
...StyleSheet.absoluteFillObject,
165157
},
166158
});
167159

example/App.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,7 @@ const App = React.createClass({
9595

9696
let styles = StyleSheet.create({
9797
container: {
98-
position: 'absolute',
99-
top: 0,
100-
left: 0,
101-
right: 0,
102-
bottom: 0,
98+
...StyleSheet.absoluteFillObject,
10399
justifyContent: 'flex-end',
104100
alignItems: 'center',
105101
},

example/examples/AnimatedMarkers.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,12 @@ const AnimatedMarkers = React.createClass({
6868

6969
let styles = StyleSheet.create({
7070
container: {
71-
position: 'absolute',
72-
top: 0,
73-
left: 0,
74-
right: 0,
75-
bottom: 0,
71+
...StyleSheet.absoluteFillObject,
7672
justifyContent: 'flex-end',
7773
alignItems: 'center',
7874
},
7975
map: {
80-
position: 'absolute',
81-
top: 0,
82-
left: 0,
83-
right: 0,
84-
bottom: 0,
76+
...StyleSheet.absoluteFillObject,
8577
},
8678
bubble: {
8779
flex: 1,

example/examples/AnimatedViews.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,7 @@ const AnimatedViews = React.createClass({
389389

390390
let styles = StyleSheet.create({
391391
container: {
392-
position: 'absolute',
393-
top: 0,
394-
left: 0,
395-
right: 0,
396-
bottom: 0,
392+
...StyleSheet.absoluteFillObject,
397393
},
398394
itemContainer: {
399395
backgroundColor: 'transparent',
@@ -406,11 +402,7 @@ let styles = StyleSheet.create({
406402
},
407403
map: {
408404
backgroundColor: 'transparent',
409-
position: 'absolute',
410-
top: 0,
411-
left: 0,
412-
bottom: 0,
413-
right: 0,
405+
...StyleSheet.absoluteFillObject,
414406
},
415407
item: {
416408
width: ITEM_WIDTH,

example/examples/Callouts.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,20 +117,12 @@ const Callouts = React.createClass({
117117

118118
let styles = StyleSheet.create({
119119
container: {
120-
position: 'absolute',
121-
top: 0,
122-
left: 0,
123-
right: 0,
124-
bottom: 0,
120+
...StyleSheet.absoluteFillObject,
125121
justifyContent: 'flex-end',
126122
alignItems: 'center',
127123
},
128124
map: {
129-
position: 'absolute',
130-
top: 0,
131-
left: 0,
132-
right: 0,
133-
bottom: 0,
125+
...StyleSheet.absoluteFillObject,
134126
},
135127
bubble: {
136128
flex: 1,

example/examples/DefaultMarkers.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,20 +78,12 @@ const DefaultMarkers = React.createClass({
7878

7979
let styles = StyleSheet.create({
8080
container: {
81-
position: 'absolute',
82-
top: 0,
83-
left: 0,
84-
right: 0,
85-
bottom: 0,
81+
...StyleSheet.absoluteFillObject,
8682
justifyContent: 'flex-end',
8783
alignItems: 'center',
8884
},
8985
map: {
90-
position: 'absolute',
91-
top: 0,
92-
left: 0,
93-
right: 0,
94-
bottom: 0,
86+
...StyleSheet.absoluteFillObject,
9587
},
9688
bubble: {
9789
backgroundColor: 'rgba(255,255,255,0.7)',

example/examples/DisplayLatLng.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,12 @@ const DisplayLatLng = React.createClass({
8383

8484
let styles = StyleSheet.create({
8585
container: {
86-
position: 'absolute',
87-
top: 0,
88-
left: 0,
89-
right: 0,
90-
bottom: 0,
86+
...StyleSheet.absoluteFillObject,
9187
justifyContent: 'flex-end',
9288
alignItems: 'center',
9389
},
9490
map: {
95-
position: 'absolute',
96-
top: 0,
97-
left: 0,
98-
right: 0,
99-
bottom: 0,
91+
...StyleSheet.absoluteFillObject,
10092
},
10193
bubble: {
10294
backgroundColor: 'rgba(255,255,255,0.7)',

example/examples/DraggableMarkers.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,12 @@ const MarkerTypes = React.createClass({
7676

7777
let styles = StyleSheet.create({
7878
container: {
79-
position: 'absolute',
80-
top: 0,
81-
left: 0,
82-
right: 0,
83-
bottom: 0,
79+
...StyleSheet.absoluteFillObject,
8480
justifyContent: 'flex-end',
8581
alignItems: 'center',
8682
},
8783
map: {
88-
position: 'absolute',
89-
top: 0,
90-
left: 0,
91-
right: 0,
92-
bottom: 0,
84+
...StyleSheet.absoluteFillObject,
9385
},
9486
});
9587

example/examples/EventListener.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,7 @@ const DisplayLatLng = React.createClass({
117117

118118
let styles = StyleSheet.create({
119119
container: {
120-
position: 'absolute',
121-
top: 0,
122-
left: 0,
123-
right: 0,
124-
bottom: 0,
120+
...StyleSheet.absoluteFillObject,
125121
justifyContent: 'flex-end',
126122
alignItems: 'center',
127123
},

example/examples/FitToSuppliedMarkers.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,20 +146,12 @@ const FocusOnMarkers = React.createClass({
146146

147147
let styles = StyleSheet.create({
148148
container: {
149-
position: 'absolute',
150-
top: 0,
151-
left: 0,
152-
right: 0,
153-
bottom: 0,
149+
...StyleSheet.absoluteFillObject,
154150
justifyContent: 'flex-end',
155151
alignItems: 'center',
156152
},
157153
map: {
158-
position: 'absolute',
159-
top: 0,
160-
left: 0,
161-
right: 0,
162-
bottom: 0,
154+
...StyleSheet.absoluteFillObject,
163155
},
164156
});
165157

0 commit comments

Comments
 (0)