Browse Source

Merge branch 'master' of https://git.cocorobo.cn/CocoRoboLabs/CocoRoboDesktop

lsc 2 years ago
parent
commit
3572ae3ece
1 changed files with 16 additions and 6 deletions
  1. 16 6
      kityminder-editor/dist/index.html

+ 16 - 6
kityminder-editor/dist/index.html

@@ -1,5 +1,6 @@
 <!DOCTYPE html>
 <html>
+
 <head>
 	<meta charset="utf-8">
 	<title>KityMinder Editor - Powered By FEX</title>
@@ -17,12 +18,14 @@
 	<link rel="stylesheet" href="kityminder.editor.min.css">
 
 	<style>
-		html, body {
+		html,
+		body {
 			margin: 0;
 			padding: 0;
 			height: 100%;
 			overflow: hidden;
 		}
+
 		h1.editor-title {
 			background: #393F4F;
 			color: white;
@@ -34,6 +37,7 @@
 			font-weight: normal;
 			padding: 0 20px;
 		}
+
 		div.minder-editor-container {
 			position: absolute;
 			top: 0px;
@@ -43,9 +47,10 @@
 		}
 	</style>
 </head>
+
 <body ng-app="kityminderDemo" ng-controller="MainController">
-<h1 class="editor-title" style=" display:none">KityMinder Editor - Powered By FEX</h1>
-<kityminder-editor on-init="initEditor(editor, minder)"></kityminder-editor>
+	<h1 class="editor-title" style=" display:none">KityMinder Editor - Powered By FEX</h1>
+	<kityminder-editor on-init="initEditor(editor, minder)"></kityminder-editor>
 </body>
 
 <!-- bower:js -->
@@ -74,16 +79,21 @@
 
 
 <script>
-	angular.module('kityminderDemo', ['kityminderEditor'])
+	window.onload = function () {
+		angular.module('kityminderDemo', ['kityminderEditor'])
 			.config(function (configProvider) {
 				configProvider.set('imageUpload', '../server/imageUpload.php');
 			})
-			.controller('MainController', function($scope) {
-				$scope.initEditor = function(editor, minder) {
+			.controller('MainController', function ($scope) {
+				$scope.initEditor = function (editor, minder) {
 					window.editor = editor;
 					window.minder = minder;
+					setTimeout(function () {
+						window.editor.minder.getRenderContainer().setTranslate([(window.editor.minder._lastClientSize.width - window.editor.minder._root._contentBox.width) / 2, 120]);
+					}, 500)
 				};
 			});
+	}
 	document.domain = document.domain.split(".").slice(-2).join(".");
 </script>