Skip to content

Commit

Permalink
few fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
etabard committed Jun 25, 2015
1 parent cfc03bc commit 8fd1126
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/ios/OverAppBrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
NSString* callbackId;
UIWebView* overWebView;
NSURL* currentUrl;
BOOL isAutoFadeIn;
BOOL _injectedIframeBridge;
}

Expand Down
4 changes: 3 additions & 1 deletion src/ios/OverAppBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ - (void) open:(CDVInvokedUrlCommand *)command
originx = [[arguments objectAtIndex:1] floatValue];
originy = [[arguments objectAtIndex:2] floatValue];
width = [[arguments objectAtIndex:3] floatValue];
isAutoFadeIn = false;
if (argc > 3) {
height = [[arguments objectAtIndex:4] floatValue];
}
Expand Down Expand Up @@ -260,7 +261,8 @@ - (void)injectDeferredObject:(NSString*)source withWrapper:(NSString*)jsWrapper
}

if (jsWrapper != nil) {
NSString* sourceArrayString = [@[source] JSONString];
NSData* jsonData = [NSJSONSerialization dataWithJSONObject:@[source] options:0 error:nil];
NSString* sourceArrayString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
if (sourceArrayString) {
NSString* sourceString = [sourceArrayString substringWithRange:NSMakeRange(1, [sourceArrayString length] - 2)];
NSString* jsToInject = [NSString stringWithFormat:jsWrapper, sourceString];
Expand Down
2 changes: 1 addition & 1 deletion www/OverAppBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ OverAppBrowser.prototype = {
};

module.exports = function(strUrl, originx,originy,width,height, isAutoFadeIn) {
isAutoFadeIn = isAutoFadeIn || false;
isAutoFadeIn = isAutoFadeIn || true;
strUrl = urlutil.makeAbsolute(strUrl);
var oab = new OverAppBrowser();
var cb = function(eventname) {
Expand Down

0 comments on commit 8fd1126

Please sign in to comment.