From d01e3497b52758febb69b93321807e15372414c0 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Wed, 3 Jun 2009 13:03:10 +0000 Subject: [PATCH] improved design git-svn-id: http://svg-edit.googlecode.com/svn/trunk@20 eee81c28-f429-11dd-99c0-75d572ba1ddd --- images/circle.png | Bin 663 -> 1040 bytes images/clear.png | Bin 373 -> 812 bytes images/delete.png | Bin 549 -> 1294 bytes images/line.png | Bin 665 -> 1026 bytes images/path.png | Bin 801 -> 1218 bytes images/rect.png | Bin 428 -> 422 bytes images/select.png | Bin 456 -> 712 bytes images/submit.png | Bin 668 -> 1272 bytes svg-editor.css | 79 ++++++++++++++++++++++++++++++++++++++++++---- svg-editor.html | 67 +++++++++++++++++++++++---------------- svg-editor.js | 47 +++++++++++++++++++++++++++ 11 files changed, 160 insertions(+), 33 deletions(-) diff --git a/images/circle.png b/images/circle.png index 4e7c247b7f4354ee6fccf709e05b3ff7fdded723..e7bd228b7e860e00658ea987bc8e6be592d4024b 100644 GIT binary patch delta 995 zcmV<9104L91&|0KiBL{Q4GJ0x0000DNk~Le0000O0000O2nGNE0N{5$_>mzR3k}x* z01ejxLMWSfkwzzf1C2>UK~zYIwU%9I990y@|MTU{Y!WxSNr-h5%~Nq-6oRx6D1 zZbKBJ5Pw|X@dHE<#DJ2}>WkDq`32S{X+()>Wdm(|vE3DPeJDw@o1NWu zCp&Y`y*?zno&7X<=!Ics4)^?j=bU@y-jRe5xSvDb&tz$TckIijSq4*6Q+g_udYgy_ zIp+t7C`?4)oM(yXCJ`+=j`L1D9=G=m7#kZKC8G11rb*FgbltKnI$~KNP1B_1<>mC! zk#Omtm7kdJXkB=+GV)0wf`H5I8c4KmK@=(JspAPnPo9XbwJfN0&;is*Is<7C)nCn$mjDP*8qs<>At?c+aOZz zIafg%*-PL;!5rxCPZQCh8i40{QOmLzi1bQl)&Nw;?iA(chMv(FV~><{)zSlFtYc_! zNQUQsHCW8u1+B4_=5fGd7(R5k%XM8-lB6~vL|*k}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WLd0&D;3rTf0B7wEkfz5|$?RGL}~c7#9Qb6V~641Tsmrt<#s@1_hA^MUNisW0Y~ z>$V);`_F?#G;h1~#f;jlhD4jyL0ui|jOCv>jM@AhJ?0_ zaus_^^>@Ztr-_T_pO~^~!7|6BJDd)z2@DSyj;vy0a@Z79RcR*R(54eSd(ne=*SlR6 z>;5%tv}3s0`7|Tx&8uKVxA&EMH)wJhrOZ6X#$=%RmTf`8)0&B2gHsqC*00LyR&m*? z$?}n_@bi+yFX}bVtgfzUzH}>gQiw0-!$POLy{j{yGi=z(b**1BGIVl;NW-3Wf|?)m z)Ve;J`m1cac;tWTf2O5}ug}f;Hpu{3o~V|%MwBEMr6!i7>ZSk*1|tIl3tdAaT?69~ wLnA9ALn}iQZ36=<1B1fC#aCb&a`RI%(<%vQ&^vJT0Z;>jr>mdKI;Vst0D81G<^TWy literal 549 zcmV+=0^0qFP)9EH+vTHm8l+sY#=touX0HFJPe-LWC58O$sBsJ6Cv@WZVex?dD~k=Y`+A zBdXPkdj7M;<8r`vYGfr~aA6)ZpGpOf%K-?{IV}XQr)S7i3b6+YAwVerjIJ(J9HXL0 zW6bVuR1^`vzc(Z(g#k2S%OX=MF}A&pFwG`x+qg$ZWQs)$%c7N$ty9K#cj=#=Zk%uD z<}fS^_wbN(HVeS7{e3QTxyBt$aKFAzpXVVRhaulbNQsqBlb)RX7#fB=?d<4r?15@+ z^tvt+$Hz#=(JrbmxG>LO8RejrilvK}00000NkvXXu0mjfATi^l diff --git a/images/line.png b/images/line.png index 2015d85d14533aa19aea76673af1accfea932335..37975742e22eae6365ee19d06b3d042a75819f23 100644 GIT binary patch delta 981 zcmV;`11kKP1%e16iBL{Q4GJ0x0000DNk~Le0000O0000O2nGNE0N{5$_>mzR3k}Wy z01eIo{qbQlkwzzf1Aj?GK~zYI&6QnfTV)u>|L-{`OPY^nrjzPg93{IEfkgOWF~cywADNnaVrz{80Apig z(?oQMh+eD(0AMKaWJEpUa-zXzg_Hy-X=LD|?~axMH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&LA1{_sjjIr^EU>e~4{hj0EW3H~Qs8lK(9UW0B zl~`I@Vt#&}!C=7Q;UQXUOFCA;?CdNzH#g+-c{VpU$>nmauC7w6)ff(k+}_?21Odhv zTg@1O)|zs;%-Pu)cXxNR+ikSgc96yxlu{&+4W@cjIY<4oaz!F65s_V$S5m`8#uy9U-Q8t> ze;=(i=jZ1)4g7gMx%jJ$})GmU6fLU zVQB9^zXLoyJ+Zz0lc{R;w+X}U#P2-G9LM3{z~>Kim&~+5hi+*A0000 +
+
-
+
+
square
+
rectangle
+
freehand
+
+ +
+
circle
+
ellipse
+
freehand
+
- - - -
- - - -
- - - -
- - - + +
+
+
+
+
+
+
-
Fill +
+ +
fill
-
Stroke +
+ +
stroke
+
+
- +
-
- - +
+ +
diff --git a/svg-editor.js b/svg-editor.js index d899bbb1..e4e070ea 100644 --- a/svg-editor.js +++ b/svg-editor.js @@ -8,6 +8,11 @@ $(document).ready(function(){ }); $('#palette').append(str); + var pos = $('#tools_rect_show').position(); + $('#tools_rect').css({'left': pos.left+2, 'top': pos.top+2}); + pos = $('#tools_circle_show').position(); + $('#tools_circle').css({'left': pos.left+2, 'top': pos.top+2}); + $('#stroke_width').change(function(){ SvgCanvas.setStrokeWidth(this.options[this.selectedIndex].value); }); @@ -40,42 +45,68 @@ $(document).ready(function(){ $('#tool_select').click(function(){ SvgCanvas.setMode('select'); + $('.tool_button_current').removeClass('tool_button_current').addClass('tool_button'); + $(this).addClass('tool_button_current'); }); $('#tool_path').click(function(){ SvgCanvas.setMode('path'); + $('.tool_button_current').removeClass('tool_button_current').addClass('tool_button'); + $(this).addClass('tool_button_current'); }); $('#tool_line').click(function(){ SvgCanvas.setMode('line'); + $('.tool_button_current').removeClass('tool_button_current').addClass('tool_button'); + $(this).addClass('tool_button_current'); }); $('#tool_square').click(function(){ SvgCanvas.setMode('square'); + $('#tools_rect').hide(); + $('.tool_button_current').removeClass('tool_button_current').addClass('tool_button'); + $('#tools_rect_show').addClass('tool_button_current'); }); $('#tool_rect').click(function(){ SvgCanvas.setMode('rect'); + $('#tools_rect').hide(); + $('.tool_button_current').removeClass('tool_button_current').addClass('tool_button'); + $('#tools_rect_show').addClass('tool_button_current'); }); $('#tool_fhrect').click(function(){ SvgCanvas.setMode('fhrect'); + $('#tools_rect').hide(); + $('.tool_button_current').removeClass('tool_button_current').addClass('tool_button'); + $('#tools_rect_show').addClass('tool_button_current'); }); $('#tool_circle').click(function(){ SvgCanvas.setMode('circle'); + $('#tools_circle').hide(); + $('.tool_button_current').removeClass('tool_button_current').addClass('tool_button'); + $('#tools_circle_show').addClass('tool_button_current'); }); $('#tool_ellipse').click(function(){ SvgCanvas.setMode('ellipse'); + $('#tools_circle').hide(); + $('.tool_button_current').removeClass('tool_button_current').addClass('tool_button'); + $('#tools_circle_show').addClass('tool_button_current'); }); $('#tool_fhellipse').click(function(){ SvgCanvas.setMode('fhellipse'); + $('#tools_circle').hide(); + $('.tool_button_current').removeClass('tool_button_current').addClass('tool_button'); + $('#tools_circle_show').addClass('tool_button_current'); }); $('#tool_delete').click(function(){ SvgCanvas.setMode('delete'); + $('.tool_button_current').removeClass('tool_button_current').addClass('tool_button'); + $(this).addClass('tool_button_current'); }); $('#tool_clear').click(function(){ @@ -124,6 +155,22 @@ $(document).ready(function(){ picker.setColor($(this).attr('value')); }); + $('#tools_rect_show').click(function(){ + $('#tools_rect').show(); + }); +/* + $('#tools_rect').mouseout(function(){ + $('#tools_rect').hide(); + }); +*/ + $('#tools_circle_show').click(function(){ + $('#tools_circle').show(); + }); +/* + $('#tools_circle').mouseout(function(){ + $('#tools_circle').hide(); + }); +*/ }) function serializeHandler(svg) {