fix: removed dialog position code from master branch until fixes are applied

This commit is contained in:
shnist 2018-12-21 10:11:11 +00:00
parent 30fafeeeef
commit 7ef3a9db76
2 changed files with 4 additions and 11 deletions

View File

@ -39,14 +39,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
showPreview = [[command.arguments objectAtIndex:2] boolValue];
}
CGRect rect;
if ([command.arguments count] >= 4) {
NSArray *positionValues = command.arguments[3];
rect = CGRectMake(0,0,[[positionValues objectAtIndex:0] floatValue],[[positionValues objectAtIndex:1] floatValue]);
} else {
rect = CGRectMake(0, 0, 1000.0f, 150.0f);
}
CDVViewController* cont = (CDVViewController*)[super viewController];
self.cdvViewController = cont;
NSString *uti = nil;
@ -88,6 +80,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
wasOpened = [docController presentPreviewAnimated: NO];
} else {
CDVViewController* cont = self.cdvViewController;
CGRect rect = CGRectMake(0, 0, cont.view.bounds.size.width, cont.view.bounds.size.height);
wasOpened = [docController presentOpenInMenuFromRect:rect inView:cont.view animated:YES];
}

View File

@ -26,10 +26,10 @@ var exec = require('cordova/exec');
function FileOpener2() {}
FileOpener2.prototype.open = function (fileName, contentType, options) {
FileOpener2.prototype.open = function (fileName, contentType, callbackContext) {
contentType = contentType || '';
options = options || {};
exec(options.success || null, options.error || null, 'FileOpener2', 'open', [fileName, contentType, false, options.position]);
callbackContext = callbackContext || {};
exec(callbackContext.success || null, callbackContext.error || null, 'FileOpener2', 'open', [fileName, contentType]);
};
FileOpener2.prototype.showOpenWithDialog = function (fileName, contentType, callbackContext) {