1234567891011121314151617181920212223242526272829 |
- import 'dart:js' as js;
- final ifCurEnvIsShell = js.context.hasProperty('FisShellApi');
- final _shellApi = ifCurEnvIsShell
- ? js.context['FisShellApi'] as js.JsObject
- : js.JsObject(js.context['Object']);
- js.JsObject callShellMethod(String method, List<dynamic>? args) {
- if (ifCurEnvIsShell) {
- return _shellApi.callMethod(method, args ?? []);
- } else {
- return js.JsObject(js.context['Object']);
- }
- }
- js.JsObject callShellGetClipPlaneData(msg) {
-
- return callShellMethod('getClipPlaneData', [msg]);
- }
- js.JsObject callShellGetVesselClipPlanePoints(msg) {
- return callShellMethod('getVesselClipPlanePoints', []);
- }
- js.JsObject callShellSwitchMeasureMode(res, imageAdjustPara) =>
- callShellMethod("switchMeasureMode", [res, imageAdjustPara.toJson()]);
|