From 8abe7ee38bc071ac0793b75979a6389d91d221ef Mon Sep 17 00:00:00 2001 From: edwin-alvarez Date: Sun, 17 May 2020 10:10:53 -0700 Subject: [PATCH 1/2] Sharing Text and Images at the same time - Fix issue on Iphone to allow Sharing Text and Images at the same time. - Sync with neckaros/esys-flutter-share looks like he fix a Ipad problem --- example/.flutter-plugins-dependencies | 1 + example/ios/Flutter/Flutter.podspec | 18 +++ .../ios/Flutter/flutter_export_environment.sh | 12 ++ example/ios/Runner.xcodeproj/project.pbxproj | 24 ++-- .../xcshareddata/WorkspaceSettings.xcsettings | 8 -- ios/Classes/SwiftEsysFlutterSharePlugin.swift | 136 ++++++++++++------ 6 files changed, 132 insertions(+), 67 deletions(-) create mode 100644 example/.flutter-plugins-dependencies create mode 100644 example/ios/Flutter/Flutter.podspec create mode 100755 example/ios/Flutter/flutter_export_environment.sh delete mode 100644 example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies new file mode 100644 index 0000000..08f3337 --- /dev/null +++ b/example/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"esys_flutter_share","path":"/Users/emalware/Documents/GitHub/esys-flutter-share/","dependencies":["path_provider"]},{"name":"path_provider","path":"/Users/emalware/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.8/","dependencies":[]}],"android":[{"name":"esys_flutter_share","path":"/Users/emalware/Documents/GitHub/esys-flutter-share/","dependencies":["path_provider"]},{"name":"path_provider","path":"/Users/emalware/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.8/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/emalware/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+2/","dependencies":[]}],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"esys_flutter_share","dependencies":["path_provider"]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]}],"date_created":"2020-05-17 09:26:15.641282","version":"1.17.1"} \ No newline at end of file diff --git a/example/ios/Flutter/Flutter.podspec b/example/ios/Flutter/Flutter.podspec new file mode 100644 index 0000000..5ca3041 --- /dev/null +++ b/example/ios/Flutter/Flutter.podspec @@ -0,0 +1,18 @@ +# +# NOTE: This podspec is NOT to be published. It is only used as a local source! +# + +Pod::Spec.new do |s| + s.name = 'Flutter' + s.version = '1.0.0' + s.summary = 'High-performance, high-fidelity mobile apps.' + s.description = <<-DESC +Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS. + DESC + s.homepage = 'https://flutter.io' + s.license = { :type => 'MIT' } + s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } + s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } + s.ios.deployment_target = '8.0' + s.vendored_frameworks = 'Flutter.framework' +end diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh new file mode 100755 index 0000000..a2399da --- /dev/null +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# This is a generated file; do not edit or check into version control. +export "FLUTTER_ROOT=/Users/emalware/Documents/flutter" +export "FLUTTER_APPLICATION_PATH=/Users/emalware/Documents/GitHub/esys-flutter-share/example" +export "FLUTTER_TARGET=/Users/emalware/Documents/GitHub/esys-flutter-share/example/lib/main.dart" +export "FLUTTER_BUILD_DIR=build" +export "SYMROOT=${SOURCE_ROOT}/../build/ios" +export "OTHER_LDFLAGS=$(inherited) -framework Flutter" +export "FLUTTER_FRAMEWORK_DIR=/Users/emalware/Documents/flutter/bin/cache/artifacts/engine/ios" +export "FLUTTER_BUILD_NAME=1.0.0" +export "FLUTTER_BUILD_NUMBER=1" +export "TRACK_WIDGET_CREATION=true" diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 7ef591e..e1d3add 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -10,11 +10,7 @@ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 30CC177B0653FC1250DBBDDC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9BB236F61766429B48517DC1 /* Pods_Runner.framework */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; @@ -27,8 +23,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -38,14 +32,15 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 2E5C0BBD7D62CB710027B3CC /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; + 3C0A3C2BE03E9F59173D1870 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 8EAD3609D7D7E23B86CA3900 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -59,8 +54,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 30CC177B0653FC1250DBBDDC /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -79,6 +72,9 @@ 4204C137FD4F389FE8CF8C94 /* Pods */ = { isa = PBXGroup; children = ( + 2E5C0BBD7D62CB710027B3CC /* Pods-Runner.debug.xcconfig */, + 3C0A3C2BE03E9F59173D1870 /* Pods-Runner.release.xcconfig */, + 8EAD3609D7D7E23B86CA3900 /* Pods-Runner.profile.xcconfig */, ); name = Pods; sourceTree = ""; @@ -86,9 +82,7 @@ 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( - 3B80C3931E831B6300D905FE /* App.framework */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEBA1CF902C7004384FC /* Flutter.framework */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 9740EEB31CF90195004384FC /* Generated.xcconfig */, @@ -225,7 +219,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; 53F69E7EBD03F2E7D52A5B83 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; @@ -233,7 +227,7 @@ files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework", "${BUILT_PRODUCTS_DIR}/esys_flutter_share/esys_flutter_share.framework", "${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework", @@ -246,7 +240,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 9740EEB61CF901F6004384FC /* Run Script */ = { diff --git a/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 949b678..0000000 --- a/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - BuildSystemType - Original - - diff --git a/ios/Classes/SwiftEsysFlutterSharePlugin.swift b/ios/Classes/SwiftEsysFlutterSharePlugin.swift index ee97425..92911ad 100644 --- a/ios/Classes/SwiftEsysFlutterSharePlugin.swift +++ b/ios/Classes/SwiftEsysFlutterSharePlugin.swift @@ -22,58 +22,26 @@ public class SwiftEsysFlutterSharePlugin: NSObject, FlutterPlugin { } func text(arguments:Any?) -> Void { - // prepare method channel args - // no use in ios - //// let title:String = argsMap.value(forKey: "title") as! String let argsMap = arguments as! NSDictionary let text:String = argsMap.value(forKey: "text") as! String - // set up activity view controller - let activityViewController:UIActivityViewController = UIActivityViewController(activityItems: [text], applicationActivities: nil) - - // present the view controller - let controller = UIApplication.shared.keyWindow!.rootViewController as! FlutterViewController - activityViewController.popoverPresentationController?.sourceView = controller.view - - controller.show(activityViewController, sender: self) + setupAndShow(activityItems: [text], argsMap: argsMap) } func file(arguments:Any?) -> Void { - // prepare method channel args - // no use in ios - //// let title:String = argsMap.value(forKey: "title") as! String let argsMap = arguments as! NSDictionary let name:String = argsMap.value(forKey: "name") as! String - let text:String = argsMap.value(forKey: "text") as! String - - // load the file - let docsPath:String = NSSearchPathForDirectoriesInDomains(.cachesDirectory,.userDomainMask , true).first!; - let contentUri = NSURL(fileURLWithPath: docsPath).appendingPathComponent(name) - - // prepare sctivity items - var activityItems:[Any] = [contentUri!]; - if(!text.isEmpty){ - // add optional text - activityItems.append(text); - } - - // set up activity view controller - let activityViewController:UIActivityViewController = UIActivityViewController(activityItems: activityItems, applicationActivities: nil) - - // present the view controller - let controller = UIApplication.shared.keyWindow!.rootViewController as! FlutterViewController - activityViewController.popoverPresentationController?.sourceView = controller.view - - controller.show(activityViewController, sender: self) + let tempDic: NSMutableDictionary = argsMap.mutableCopy() as! NSMutableDictionary + tempDic["names"] = [name] + files(arguments:tempDic) } func files(arguments:Any?) -> Void { // prepare method channel args - // no use in ios - //// let title:String = argsMap.value(forKey: "title") as! String let argsMap = arguments as! NSDictionary let names:[String] = argsMap.value(forKey: "names") as! [String] let text:String = argsMap.value(forKey: "text") as! String + let mimeType:String = argsMap.value(forKey: "mimeType") as! String // prepare sctivity items var activityItems:[Any] = []; @@ -81,21 +49,101 @@ public class SwiftEsysFlutterSharePlugin: NSObject, FlutterPlugin { // load the files for name in names { let docsPath:String = NSSearchPathForDirectoriesInDomains(.cachesDirectory,.userDomainMask , true).first!; - activityItems.append(NSURL(fileURLWithPath: docsPath).appendingPathComponent(name)!); + + //try to convert the file into a JPG/ PNG + if let image = getAsImageContent(path: docsPath, fileName:name, mimeType:mimeType){ + activityItems.append(image) + } + else{ + activityItems.append(NSURL(fileURLWithPath: docsPath).appendingPathComponent(name)!); + } } if(!text.isEmpty){ // add optional text activityItems.append(text); } + + setupAndShow(activityItems: activityItems, argsMap: argsMap) + } + + private func isImageMimeType(mimeType:String) -> Bool + { + if(!mimeType.isEmpty && (mimeType.lowercased() == "image/png" || mimeType.lowercased() == "image/jpg")){ + return true; + } + + return false; + } + + private func getAsImageContent(path: String, fileName: String, mimeType: String) -> Data? + { + //check if file is a valid image mimeType + if(!isImageMimeType(mimeType:mimeType)) { + return nil + } + + if(path.isEmpty || fileName.isEmpty){ + return nil + } - // set up activity view controller - let activityViewController:UIActivityViewController = UIActivityViewController(activityItems: activityItems, applicationActivities: nil) - - // present the view controller + let contentUri = NSURL(fileURLWithPath: path).appendingPathComponent(fileName) + + if(contentUri?.path != nil) { + if let image = UIImage(contentsOfFile: contentUri!.path) { + + if(mimeType.lowercased() == "image/png" ) { + if let imagepng = UIImagePNGRepresentation(image) + { + let imageData1: Data = imagepng + return imageData1 + } + } + else if(mimeType.lowercased() == "image/jpg" ) { + if let imagepng = UIImageJPEGRepresentation(image, 1) + { + let imageData1: Data = imagepng + return imageData1 + } + } + } + } + + return nil + } + + private func setupAndShow(activityItems: [Any], argsMap: NSDictionary) { + let activityViewController = UIActivityViewController(activityItems: activityItems, applicationActivities: nil) let controller = UIApplication.shared.keyWindow!.rootViewController as! FlutterViewController - activityViewController.popoverPresentationController?.sourceView = controller.view + if(UIDevice.current.userInterfaceIdiom != .pad){ + activityViewController.popoverPresentationController?.sourceView = controller.view + } + else { + if let popover = activityViewController.popoverPresentationController { + popover.sourceView = controller.view + let bounds = controller.view.bounds + + if (UIDevice.current.userInterfaceIdiom == .pad) { + let originX:NSNumber = argsMap.value(forKey: "originX") as? NSNumber ?? NSNumber(value: Float(bounds.midX)) + let originY:NSNumber = argsMap.value(forKey: "originY") as? NSNumber ?? NSNumber(value: Float(bounds.midY)) + var originWidth:NSNumber = argsMap.value(forKey: "originWidth") as? NSNumber ?? 0 + var originHeight:NSNumber = argsMap.value(forKey: "originHeight") as? NSNumber ?? 0 + + if (originWidth.intValue > (bounds.width - 96 as NSNumber).intValue) { + originWidth = NSNumber(value: Float((bounds.width - 96))) + } + if (originHeight.intValue > (bounds.height - 96 as NSNumber).intValue) { + originHeight = NSNumber(value: Float((bounds.height - 96))) + } + + popover.sourceRect = CGRect(x:originX.doubleValue, + y:originY.doubleValue, + width:originWidth.doubleValue, + height:originHeight.doubleValue); + } + } + } controller.show(activityViewController, sender: self) } -} +} \ No newline at end of file From 1fabff4af05b9afd70e68e784be2f4e0c030a75d Mon Sep 17 00:00:00 2001 From: edwin-alvarez Date: Sun, 17 May 2020 10:17:40 -0700 Subject: [PATCH 2/2] Sync dart file with changes from neckaros Fixes for IPAD --- lib/esys_flutter_share.dart | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/lib/esys_flutter_share.dart b/lib/esys_flutter_share.dart index d8c37d4..b71fc31 100644 --- a/lib/esys_flutter_share.dart +++ b/lib/esys_flutter_share.dart @@ -1,5 +1,6 @@ import 'dart:async'; import 'dart:io'; +import 'dart:ui'; import 'package:flutter/services.dart'; import 'package:path_provider/path_provider.dart'; @@ -9,19 +10,22 @@ class Share { 'channel:github.com/orgs/esysberlin/esys-flutter-share'); /// Sends a text to other apps. - static void text(String title, String text, String mimeType) { - Map argsMap = { + static void text(String title, String text, String mimeType, + {Rect sharePositionOrigin}) { + Map argsMap = { 'title': '$title', 'text': '$text', 'mimeType': '$mimeType' }; + argsMap = _addRect(argsMap, sharePositionOrigin); _channel.invokeMethod('text', argsMap); } /// Sends a file to other apps. static Future file( - String title, String name, List bytes, String mimeType, {String text = ''}) async { - Map argsMap = { + String title, String name, List bytes, String mimeType, + {String text = '', Rect sharePositionOrigin}) async { + Map argsMap = { 'title': '$title', 'name': '$name', 'mimeType': '$mimeType', @@ -31,13 +35,14 @@ class Share { final tempDir = await getTemporaryDirectory(); final file = await new File('${tempDir.path}/$name').create(); await file.writeAsBytes(bytes); - + argsMap = _addRect(argsMap, sharePositionOrigin); _channel.invokeMethod('file', argsMap); } /// Sends multiple files to other apps. static Future files( - String title, Map> files, String mimeType, {String text = ''}) async { + String title, Map> files, String mimeType, + {String text = '', Rect sharePositionOrigin}) async { Map argsMap = { 'title': '$title', 'names': files.entries.toList().map((x) => x.key).toList(), @@ -52,6 +57,20 @@ class Share { await file.writeAsBytes(entry.value); } + argsMap = _addRect(argsMap, sharePositionOrigin); + _channel.invokeMethod('files', argsMap); } -} + + static Map _addRect( + Map argsMap, Rect sharePositionOrigin) { + if (sharePositionOrigin != null) { + argsMap['originX'] = sharePositionOrigin.left; + argsMap['originY'] = sharePositionOrigin.top; + argsMap['originWidth'] = sharePositionOrigin.width; + argsMap['originHeight'] = sharePositionOrigin.height; + } + + return argsMap; + } +} \ No newline at end of file