Commit a9bb28c3 authored by campaign's avatar campaign

by zhanyi

parent 1cf019b7
...@@ -4,8 +4,10 @@ ...@@ -4,8 +4,10 @@
<head> <head>
<script src="jquery-2.1.0.min.js"></script> <script src="jquery-2.1.0.min.js"></script>
<script src="kity.all.js"></script> <script src="kity.all.js"></script>
<script src="../configure.js"></script>
<script src="../dist/dev.php"></script> <script src="../dist/dev.php"></script>
<link href="import.css" /> <script src="../lang/zh-cn/zh-cn.js" charset="utf-8"></script>
<link href="../themes/default/_css/import.css" type="text/css" rel="stylesheet">
<style> <style>
.km_receiver{ .km_receiver{
width:300px;height:300px; width:300px;height:300px;
...@@ -15,7 +17,7 @@ ...@@ -15,7 +17,7 @@
} }
</style> </style>
</head> </head>
<body style="background:#262626; margin:0; padding:0"> <body >
<div id="kityminder" style="height:1000px;width:100%" onselectstart="return false"> <div id="kityminder" style="height:1000px;width:100%" onselectstart="return false">
<select id="StyleChange"> <select id="StyleChange">
<option value="default">Default</option> <option value="default">Default</option>
...@@ -24,15 +26,16 @@ ...@@ -24,15 +26,16 @@
</div> </div>
</body> </body>
<script> <script>
var minder = KM.createMinder(kityminder); KM.getKityMinder('kityminder');
document.getElementById("StyleChange").addEventListener("change",function(e){ // var minder = KM.createMinder(kityminder);
var val = e.target.value; // document.getElementById("StyleChange").addEventListener("change",function(e){
minder.execCommand("switchlayout",val); // var val = e.target.value;
},false); // minder.execCommand("switchlayout",val);
minder.select(minder.getRoot()); // },false);
var node = new KM.MinderNode('test'); // minder.select(minder.getRoot());
node.setData('fontcolor','red'); // var node = new KM.MinderNode('test');
minder.execCommand('appendChildNode',node); // node.setData('fontcolor','red');
// minder.execCommand('appendChildNode',node);
// var b = new kity.Bezier([new kity.BezierPoint(0,0).setVertex(100,100),new kity.BezierPoint(100,0).setVertex(100,100)]); // var b = new kity.Bezier([new kity.BezierPoint(0,0).setVertex(100,100),new kity.BezierPoint(100,0).setVertex(100,100)]);
// minder.getRenderContainer().addShape(b.stroke("white")); // minder.getRenderContainer().addShape(b.stroke("white"));
</script> </script>
......
...@@ -14,6 +14,8 @@ $dependency = Array( ...@@ -14,6 +14,8 @@ $dependency = Array(
,'src/core/minder.command.js' ,'src/core/minder.command.js'
,'src/core/minder.node.js' ,'src/core/minder.node.js'
,'src/core/keymap.js' ,'src/core/keymap.js'
,'src/core/minder.lang.js'
,'src/core/minder.defaultoptions.js'
,'src/module/history.js' ,'src/module/history.js'
,'src/module/icon.js' ,'src/module/icon.js'
,'src/module/layout.js' ,'src/module/layout.js'
...@@ -29,6 +31,26 @@ $dependency = Array( ...@@ -29,6 +31,26 @@ $dependency = Array(
,'src/module/editor.cursor.js' ,'src/module/editor.cursor.js'
,'src/module/basestyle.js' ,'src/module/basestyle.js'
,'src/module/font.js' ,'src/module/font.js'
,'src/ui/widget.js'
,'src/ui/button.js'
,'src/ui/toolbar.js'
,'src/ui/menu.js'
,'src/ui/dropmenu.js'
,'src/ui/splitbutton.js'
,'src/ui/colorsplitbutton.js'
,'src/ui/popup.js'
,'src/ui/scale.js'
,'src/ui/colorpicker.js'
,'src/ui/combobox.js'
,'src/ui/buttoncombobox.js'
,'src/ui/modal.js'
,'src/ui/tooltip.js'
,'src/ui/tab.js'
,'src/ui/separator.js'
,'src/ui/scale.js'
,'src/adapter/adapter.js'
,'src/adapter/button.js'
,'src/adapter/combobox.js'
); );
......
...@@ -28,7 +28,9 @@ var KityMinder = ...@@ -28,7 +28,9 @@ var KityMinder =
id = target.id || ( "KM_INSTANCE_" + instanceId++ ); id = target.id || ( "KM_INSTANCE_" + instanceId++ );
} }
return instanceMap[ id ] || this.createMinder(target,options); return instanceMap[ id ] || this.createMinder(target,options);
} },
//挂接多语言
LANG:{}
} }
}(); }();
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
var Minder = KityMinder.Minder = kity.createClass( "KityMinder", { var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
constructor: function ( options ) { constructor: function ( options ) {
this._options = Utils.extend( window.KITYMINDER_CONFIG || {}, options ); this._options = Utils.extend( window.KITYMINDER_CONFIG || {}, options );
this.setDefaultOptions(KM.defaultOptions);
this._initEvents(); this._initEvents();
this._initMinder(); this._initMinder();
this._initSelection(); this._initSelection();
...@@ -29,7 +30,7 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", { ...@@ -29,7 +30,7 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
} else { } else {
obj = key; obj = key;
} }
Utils.extend( this._options, obj, true ); utils.extend( this._options, obj, true );
}, },
_initMinder: function () { _initMinder: function () {
......
...@@ -3,7 +3,7 @@ KityMinder.registerModule( "fontmodule", function () { ...@@ -3,7 +3,7 @@ KityMinder.registerModule( "fontmodule", function () {
return { return {
"commands": { "commands": {
"fontcolor": kity.createClass( "fontcolorCommand", { "forecolor": kity.createClass( "fontcolorCommand", {
base: Command, base: Command,
execute: function ( km,color ) { execute: function ( km,color ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment