Mercurial > MadButterfly
comparison inkscape/firefox/content/inkscape.js @ 352:4350aa369149
Use jQuery UI components.
author | wycc |
---|---|
date | Mon, 09 Mar 2009 01:27:33 +0800 |
parents | 63aaf96209cd |
children | 6fd8da22a5ef |
comparison
equal
deleted
inserted
replaced
351:4ae9888bbde6 | 352:4350aa369149 |
---|---|
62 * | 62 * |
63 */ | 63 */ |
64 function Inkscape(file) | 64 function Inkscape(file) |
65 { | 65 { |
66 var ink = document.getElementById('inkscape'); | 66 var ink = document.getElementById('inkscape'); |
67 ink.innerHTML = "<embed src="+file+" width=640 height=480 />"; | 67 ink.innerHTML = "<embed src="+file+" width=700 height=700 />"; |
68 this.isInProgress = 0; | 68 this.isInProgress = 0; |
69 | 69 |
70 setTimeout("inkscape.fetchDocument()",4000); | 70 setTimeout("inkscape.fetchDocument()",4000); |
71 } | 71 } |
72 | 72 |
383 var currentLayer = ''; | 383 var currentLayer = ''; |
384 | 384 |
385 var last_select = null; | 385 var last_select = null; |
386 inkscape = new Inkscape("scene.mbsvg"); | 386 inkscape = new Inkscape("scene.mbsvg"); |
387 | 387 |
388 $('a.button').mouseover(function () { | 388 |
389 if (inkscape.isInProgress==0) | 389 tree = $.tree_create(); |
390 this.style.MozOpacity = 0.1; | 390 file1_animation = [ |
391 }).mouseout(function () { | 391 { |
392 this.style.MozOpacity= 1; | 392 attributes: {id:"an1-1"}, |
393 }); | 393 data: "animation1" |
394 | 394 }, |
395 { | |
396 attributes: {id:"an1-2"}, | |
397 data: "animation2" | |
398 } | |
399 ]; | |
400 file1 = { | |
401 attributes:{id:"file1"}, | |
402 data: "scene1.mbsvg", | |
403 children: file1_animation | |
404 }; | |
405 file2 = { | |
406 attributes:{id:"file2"}, | |
407 data: "scene2.mbsvg", | |
408 }; | |
409 file3 = { | |
410 attributes:{id:"file3"}, | |
411 data: "scene3.mbsvg", | |
412 }; | |
413 | |
414 scenes = [ file1,file2,file3]; | |
415 src1 = {attributes:{id:"src1"},data:"src1.c"}; | |
416 src2 = {attributes:{id:"src1"},data:"src2.c"}; | |
417 src3 = {attributes:{id:"src1"},data:"src3.c"}; | |
418 | |
419 sources = [src1,src2,src3]; | |
420 | |
421 tree.init($("#filelist"), { | |
422 data: { | |
423 type: "json", | |
424 json : { | |
425 attributes: {id: "node0"}, state: "open", data: "Project", children: [ | |
426 { attributes:{id:"scenes"}, data:"scene", children: scenes}, | |
427 { attributes:{id:"sources"},data:"sources",children: sources} | |
428 ] | |
429 } | |
430 } | |
431 }); | |
432 |