Commit 26c4353e authored by techird's avatar techird

dev.html update

parent 4d64fed6
......@@ -10,12 +10,50 @@
</body>
<script>
var minder = new km.KityMinder();
var node1 = new km.MinderNode().pipe(function () {
this.setData('x', 100);
this.setData('y', 100);
this.setData('text', "this is a text");
function allEvent () {
var events = 'click mousedown mouseup keydown keyup keypress dblclick interactchange contentchange selectionchange import'.split(' ');
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();
//console.log(minder.exportData());
</script>
</html>
\ No newline at end of file
......@@ -10,6 +10,8 @@ $dependency = Array(
$content = "";
header('Content-Type: text/javascript');
foreach ($dependency as $index => $dep) {
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