Commit 26c4353e authored by techird's avatar techird

dev.html update

parent 4d64fed6
...@@ -10,12 +10,50 @@ ...@@ -10,12 +10,50 @@
</body> </body>
<script> <script>
var minder = new km.KityMinder(); var minder = new km.KityMinder();
var node1 = new km.MinderNode().pipe(function () {
this.setData('x', 100); function allEvent () {
this.setData('y', 100); var events = 'click mousedown mouseup keydown keyup keypress dblclick interactchange contentchange selectionchange import'.split(' ');
this.setData('text', "this is a text"); var pharseEvents = [];
for(var i = 0; i < events.length; i++) {
pharseEvents.push('before' + events[i]);
pharseEvents.push('pre' + events[i]);
pharseEvents.push(events[i]);
}
return pharseEvents.join(' ');
}
minder.on(allEvent(), function(e) {
console.log(e.type);
});
minder.importData({
data: {
x: 50,
y: 50,
text: 'center',
},
children: [{
data: {
x: 200,
y: 50,
text: 'child1'
}
},{
data: {
x: 200,
y: 100,
text: 'child2'
},
children: [{
data: {
x: 350,
y: 100,
text: 'leaf'
}
}]
}]
}); });
minder.getRoot().insertChild(node1);
minder.update(); minder.update();
//console.log(minder.exportData());
</script> </script>
</html> </html>
\ No newline at end of file
...@@ -10,6 +10,8 @@ $dependency = Array( ...@@ -10,6 +10,8 @@ $dependency = Array(
$content = ""; $content = "";
header('Content-Type: text/javascript');
foreach ($dependency as $index => $dep) { foreach ($dependency as $index => $dep) {
echo file_get_contents("../$dep")."\n\n"; echo file_get_contents("../$dep")."\n\n";
} }
\ No newline at end of file
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