Mercurial > MadButterfly
comparison inkscape/firefox/content/inkscape.js @ 361:8c4456190d9a
Add text editor support to edit C source file inside the MadBuilder
author | wycc |
---|---|
date | Wed, 11 Mar 2009 08:51:11 +0800 |
parents | b4bd4819091c |
children | 83cae12cf428 |
comparison
equal
deleted
inserted
replaced
360:b4f74753d125 | 361:8c4456190d9a |
---|---|
55 return output; | 55 return output; |
56 } else { | 56 } else { |
57 return obj; | 57 return obj; |
58 } | 58 } |
59 } | 59 } |
60 | |
61 /** | |
62 * TextEditor class | |
63 * | |
64 */ | |
65 | |
66 function Inkscape(file) | |
67 { | |
68 var editor = document.getElementById('editor'); | |
69 editor.innerHTML = "<embed src="+file+" width=700 height=700 />"; | |
70 this.isInProgress = 0; | |
71 } | |
72 | |
60 /** | 73 /** |
61 * Inkscape class | 74 * Inkscape class |
62 * | 75 * |
63 */ | 76 */ |
64 function Inkscape(file) | 77 function Inkscape(file) |
439 | 452 |
440 function project_loadScene(node) | 453 function project_loadScene(node) |
441 { | 454 { |
442 var file = node.textContent; | 455 var file = node.textContent; |
443 inkscape = new Inkscape("file://"+file); | 456 inkscape = new Inkscape("file://"+file); |
457 $('#inkscape').show('slow'); | |
458 $('#editor').hide('slow'); | |
459 } | |
460 | |
461 | |
462 function project_loadEditor(node) | |
463 { | |
464 var file = node.textContent; | |
465 editor = new TextEditor(file); | |
466 $('#inkscape').hide('slow'); | |
467 $('#editor').show('slow'); | |
444 } | 468 } |
445 | 469 |
446 function project_parse(xml) | 470 function project_parse(xml) |
447 { | 471 { |
448 | 472 |