File tree Expand file tree Collapse file tree 4 files changed +7
-48
lines changed Expand file tree Collapse file tree 4 files changed +7
-48
lines changed Original file line number Diff line number Diff line change @@ -178,43 +178,6 @@ var Button = React.createClass({
178
178
}
179
179
} ) ;
180
180
181
- var ScaledWebView = React . createClass ( {
182
-
183
- getInitialState : function ( ) {
184
- return {
185
- scalingEnabled : true ,
186
- }
187
- } ,
188
-
189
- render : function ( ) {
190
- return (
191
- < View >
192
- < WebView
193
- style = { {
194
- backgroundColor : BGWASH ,
195
- height : 200 ,
196
- } }
197
- source = { { uri : 'https://facebook.github.io/react/' } }
198
- scalesPageToFit = { this . state . scalingEnabled }
199
- />
200
- < View style = { styles . buttons } >
201
- { this . state . scalingEnabled ?
202
- < Button
203
- text = "Scaling:ON"
204
- enabled = { true }
205
- onPress = { ( ) => this . setState ( { scalingEnabled : false } ) }
206
- /> :
207
- < Button
208
- text = "Scaling:OFF"
209
- enabled = { true }
210
- onPress = { ( ) => this . setState ( { scalingEnabled : true } ) }
211
- /> }
212
- </ View >
213
- </ View >
214
- ) ;
215
- } ,
216
- } )
217
-
218
181
var styles = StyleSheet . create ( {
219
182
container : {
220
183
flex : 1 ,
@@ -337,10 +300,6 @@ exports.examples = [
337
300
title : 'Simple Browser' ,
338
301
render ( ) : ReactElement { return < WebViewExample /> ; }
339
302
} ,
340
- {
341
- title : 'Scale Page to Fit' ,
342
- render ( ) : ReactElement { return < ScaledWebView /> ; }
343
- } ,
344
303
{
345
304
title : 'Bundled HTML' ,
346
305
render ( ) : ReactElement {
Original file line number Diff line number Diff line change @@ -75,6 +75,12 @@ - (void)reload
75
75
[_webView reload: self ];
76
76
}
77
77
78
+ - (void )reactSetFrame : (CGRect )frame
79
+ {
80
+ [super reactSetFrame: frame];
81
+ [_webView setFrame: frame];
82
+ }
83
+
78
84
- (void )setSource : (NSDictionary *)source
79
85
{
80
86
if (![_source isEqualToDictionary: source]) {
@@ -122,11 +128,6 @@ - (void)setContentInset:(NSEdgeInsets)contentInset
122
128
// updateOffset:NO];
123
129
}
124
130
125
- - (void )setScalesPageToFit : (BOOL )scalesPageToFit
126
- {
127
- NSLog (@" setScalesPageToFit is not implemented" );
128
- }
129
-
130
131
- (BOOL )scalesPageToFit
131
132
{
132
133
return YES ;
Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ - (NSView *)view
37
37
RCT_REMAP_VIEW_PROPERTY(bounces, _webView.scrollView.bounces, BOOL )
38
38
RCT_REMAP_VIEW_PROPERTY(scrollEnabled, _webView.scrollView.scrollEnabled, BOOL )
39
39
RCT_REMAP_VIEW_PROPERTY(decelerationRate, _webView.scrollView.decelerationRate, CGFloat )
40
- RCT_EXPORT_VIEW_PROPERTY(scalesPageToFit, BOOL )
41
40
RCT_EXPORT_VIEW_PROPERTY(injectedJavaScript, NSString )
42
41
RCT_EXPORT_VIEW_PROPERTY(contentInset, UIEdgeInsets)
43
42
RCT_EXPORT_VIEW_PROPERTY(automaticallyAdjustContentInsets, BOOL )
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-native-desktop" ,
3
- "version" : " 0.5.5 " ,
3
+ "version" : " 0.5.6 " ,
4
4
"description" : " A framework for building native desktop apps using React" ,
5
5
"license" : " BSD-3-Clause" ,
6
6
"repository" : {
You can’t perform that action at this time.
0 commit comments