|
|
|
@ -15,6 +15,8 @@ import 'meeting_details_controller.dart'; |
|
|
|
class MindMapController extends GetxController { |
|
|
|
late final WebViewController webViewController; |
|
|
|
final _meetingDetailsController = Get.find<MeetingDetailsController>(); |
|
|
|
final double _width = 1.sw - 25.w; |
|
|
|
bool isWebViewReady = false; |
|
|
|
|
|
|
|
@override |
|
|
|
void onInit() { |
|
|
|
@ -37,6 +39,8 @@ class MindMapController extends GetxController { |
|
|
|
body { |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
min-width: ${_width}px; |
|
|
|
min-height: ${_width}px; |
|
|
|
margin: 0; |
|
|
|
padding: 0; |
|
|
|
overflow: hidden; |
|
|
|
@ -63,8 +67,8 @@ class MindMapController extends GetxController { |
|
|
|
justify-content: space-around; |
|
|
|
align-items: center; |
|
|
|
position: absolute; |
|
|
|
top: 20px; |
|
|
|
right: 20px; |
|
|
|
top: 10px; |
|
|
|
right: 2px; |
|
|
|
} |
|
|
|
|
|
|
|
.mind-map .mm-toolbar-item { |
|
|
|
@ -104,9 +108,9 @@ class MindMapController extends GetxController { |
|
|
|
const toolbarElement = document.getElementById('toolbar'); |
|
|
|
toolbarElement.append(el); |
|
|
|
|
|
|
|
async function captureImage() { |
|
|
|
window.captureImage = async function() { |
|
|
|
const markmapElement = document.getElementById('markmap'); |
|
|
|
markmapElement.style.height = `${1.sw}px`; |
|
|
|
markmapElement.style.height = `${_width}px`; |
|
|
|
await mm.fit(); |
|
|
|
const options = { |
|
|
|
scale: 2, |
|
|
|
@ -127,6 +131,13 @@ class MindMapController extends GetxController { |
|
|
|
'''; |
|
|
|
webViewController = WebViewController() |
|
|
|
..setJavaScriptMode(JavaScriptMode.unrestricted) |
|
|
|
..setNavigationDelegate( |
|
|
|
NavigationDelegate( |
|
|
|
onPageFinished: (String url) { |
|
|
|
isWebViewReady = true; |
|
|
|
}, |
|
|
|
), |
|
|
|
) |
|
|
|
..addJavaScriptChannel( |
|
|
|
'ImageChannel', |
|
|
|
onMessageReceived: _messageReceived, |
|
|
|
|