mirror of
https://gitee.com/shuto/cordova-plugin-file-opener2.git
synced 2024-10-06 10:02:05 +08:00
fix: removed dialog position code from master branch until fixes are applied
This commit is contained in:
parent
30fafeeeef
commit
7ef3a9db76
@ -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];
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user