svg在firefox中性能不佳

时间:2012-06-25 04:43:16

标签: jquery svg

我的SVG有问题。在Opera中一切正常,但在Firefox中它会冻结 请参阅jsFiddle上的代码。

Jquery代码

var sessionId = 1;
        var clientId =1;
        $("g").each(function () {
            var path = $(this).children("path");
            var levelId = $(path).attr("level");
            $(this).qtip(
                {
                    content: {
                        text: 'Получаю свободные места...',
                        ajax: {
                            url: 'http://localhost:12736/PremieraInteraction.svc/GetPlacesInfoForSession',
                            data: { levelId: levelId, sessionId: sessionId, clientId: clientId },
                            dataType: 'jsonp',
                            contentType: "application/json; charset=utf-8",
                            type: "GET",
                            success: function (data) {
                                var jsonData = $.parseJSON(data);
                                if(jsonData.Success) {
                                    var content;
                                    content = "<div>Всего мест: " + jsonData.PlacesCount + "<br/>Свободно мест: " + jsonData.FreePlacesCount + "</div>";
                                    this.set('content.text', content);
                                } else {
                                    content = "<div>" + jsonData.Message + "</div>";
                                    this.set('content.text', content);
                                }
                                return false;
                            },
                            error: function(error) {
                                alert("Ошибка: " + error);
                            }
                        }
                    },
                    position: {
                        target: 'mouse',
                        adjust: {
                            x: 10

                        }
                    },
                    style: {
                        classes: 'ui-tooltip-tipsy ui-tooltip-shadow',
                        tip:true
                    }

                });
        });

HTML

<svg version="1.1" xml:space="preserve" width="660" height="" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd" viewBox="0 0 660 372">
 <defs>
  <style type="text/css">

  </style>
 </defs>
  <g id="_936269552">
   <path level="33" d="M113 7c-7,17 -15,35 -22,52 -21,4 -41,9 -61,14 -8,-14 -15,-28 -23,-42 35,-10 71,-18 107,-25z"/>
   <text x="54" y="45" class="fil1 fnt0"/>
  </g>
  <g id="_936265840" aria-describedby="ui-tooltip-206">
   <path level="9" d="M101 57c6,-13 11,-27 17,-40 17,-3 34,-5 51,-7 -2,13 -5,25 -7,38 -20,3 -41,6 -61,10z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="134" y="35" class="fil1 fnt0">1D</text>
  </g>
  <g id="_932878064">
   <path level="9" d="M154 106c3,-14 6,-27 9,-41 0,-2 -1,-3 -1,-5 -17,4 -38,11 -56,20 6,12 12,25 18,37 10,-4 19,-8 30,-11z" fill="#3399FF"/>
   <text x="130" y="94" class="fil1 fnt0">1D</text>
  </g>
  <g id="_932874352" aria-describedby="ui-tooltip-208">
   <path level="9" d="M213 94c7,-14 13,-27 20,-41 0,-2 0,-3 0,-5 -23,2 -42,6 -65,11 0,1 1,3 1,4 -3,14 -6,28 -9,41 18,-5 32,-8 53,-10z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="190" y="79" class="fil1 fnt0">1D</text>
  </g>
  <g id="_932870640" aria-describedby="ui-tooltip-209">
   <path level="9" d="M218 93c17,-2 34,-3 53,-3 7,-5 14,-10 21,-15 -6,-2 -13,-4 -19,-6 6,-8 12,-17 17,-25 -19,0 -35,1 -53,3 0,2 0,4 0,6 -6,13 -13,27 -19,40z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="251" y="71" class="fil1 fnt0">1D</text>
  </g>
  <g id="_932866928">
   <path level="9" d="M286 67c19,9 30,17 36,22 10,-4 20,-8 31,-12 -2,-2 -4,-4 -7,-7 10,-8 21,-15 31,-23 -21,-2 -49,-4 -74,-4 -6,8 -11,15 -17,23z" fill="#3399FF"/>
   <text x="319" y="68" class="fil1 fnt0">1D</text>
  </g>
  <g id="_932863216">
   <path level="2" d="M356 74c10,11 18,22 26,34 9,-2 17,-3 26,-5 -2,-4 -4,-7 -6,-11 20,-11 39,-21 59,-32 -23,-5 -47,-9 -71,-12 -11,8 -22,17 -34,25z" fill="#FF6347"/>
   <text x="391" y="81" class="fil1 fnt0"/>
  </g>
  <g id="_932859504">
   <path level="4" d="M410 99c4,9 7,20 9,31 7,1 14,1 21,2 -1,-3 -2,-6 -3,-9 20,-4 41,-8 61,-13 -8,-15 -16,-30 -23,-45 -22,12 -43,23 -65,35z" fill="#FF6347"/>
   <text x="448" y="104" class="fil1 fnt0"/>
  </g>
  <g id="_932855792" aria-describedby="ui-tooltip-213">
   <path level="9" d="M510 104c8,19 16,50 16,79 -23,0 -47,0 -70,0 0,-11 -3,-35 -9,-54 18,-4 37,-7 55,-11 -1,-4 -2,-8 -2,-12 3,-1 7,-1 10,-2z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="485" y="155" class="fil1 fnt0">1D</text>
  </g>
  <g id="_932852080">
   <path level="9" d="M510 265c8,-19 16,-50 16,-79 -23,0 -47,0 -70,0 0,11 -3,35 -9,54 18,4 37,7 55,11 -1,4 -2,8 -2,12 3,1 7,1 10,2z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="485" y="220" class="fil1 fnt0">1D</text>
  </g>
  <g id="_932848368" aria-describedby="ui-tooltip-215">
   <path level="9" d="M507 292c3,1 7,1 10,2 3,-4 6,-7 9,-11 20,-12 41,-23 61,-35 3,-21 7,-42 10,-62 -21,0 -41,0 -62,0 0,22 -5,63 -28,105z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="558" y="228" class="fil1 fnt0">1D</text>
  </g>
  <g id="_931857392" aria-describedby="ui-tooltip-216">
   <path level="9" d="M507 77c3,-1 7,-1 10,-2 3,4 6,7 9,11 20,12 41,23 61,35 3,21 7,42 10,62 -21,0 -41,0 -62,0 0,-22 -5,-63 -28,-105z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="557" y="146" class="fil1 fnt0">1D</text>
  </g>
  <g id="_931853680">
   <path level="9" d="M419 143c-3,-1 -6,-2 -10,-3 0,-2 0,-5 0,-7 -12,2 -23,5 -35,7 4,13 7,29 7,43 14,0 28,0 43,0 0,-12 -2,-28 -6,-40z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="397" y="163" class="fil1 fnt0">1D</text>
  </g>
  <g id="_931849968">
   <path level="9" d="M419 226c-3,1 -6,2 -10,3 0,2 0,5 0,7 -12,-2 -23,-5 -35,-7 4,-13 7,-29 7,-43 14,0 28,0 43,0 0,12 -2,28 -6,40z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="397" y="212" class="fil1 fnt0">1D</text>
  </g>
  <g id="_931846256">
   <path level="9" d="M344 126c1,1 3,3 4,4 9,2 18,5 27,7 11,-4 21,-7 32,-11 -4,-6 -8,-12 -11,-18 -5,1 -10,2 -15,3 -1,-1 -3,-3 -4,-4 -11,6 -22,13 -32,19z" fill="#3399FF"/>
   <text x="373" y="127" class="fil1 fnt0">1D</text>
  </g>
  <g id="_931842576">
   <path level="9" d="M296 116c0,1 1,1 1,2 15,2 30,4 45,6 11,-6 22,-13 32,-19 -3,-3 -6,-7 -9,-10 -9,-2 -18,-5 -27,-7 -6,4 -12,7 -19,11 0,0 -1,0 -1,0 -8,6 -15,12 -23,18z" fill="#3399FF"/>
   <text x="332" y="112" class="fil1 fnt0">1D</text>
  </g>
  <g id="_931838864" aria-describedby="ui-tooltip-221">
   <path level="9" d="M271 108c0,2 0,4 0,5 2,1 5,2 7,3 5,0 11,-1 16,-1 7,-6 15,-12 22,-18 -8,-2 -15,-5 -23,-7 -7,6 -15,12 -22,18z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="288" y="108" class="fil1 fnt0">1D</text>
  </g>
  <g id="_931835184">
   <path level="9" d="M365 137c-6,-2 -12,-3 -18,-5 -2,-2 -4,-3 -6,-5 -15,-2 -31,-4 -46,-6 -1,-1 -2,-2 -2,-3 -14,1 -27,2 -41,4 3,13 5,25 8,38 37,0 74,0 110,0 -1,-7 -3,-15 -5,-22z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="306" y="146" class="fil1 fnt0">1D</text>
  </g>
  <g id="_931831472" aria-describedby="ui-tooltip-223">
   <path level="9" d="M260 163c37,0 74,0 111,0 2,11 2,32 0,42 -37,0 -74,0 -111,0 0,-14 0,-28 0,-42z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="311" y="188" class="fil1 fnt0">1D</text>
  </g>
  <g id="_931827792" aria-describedby="ui-tooltip-224">
   <path level="9" d="M365 232c-6,2 -12,3 -18,5 -2,2 -4,3 -6,5 -15,2 -31,4 -46,6 -1,1 -2,2 -2,3 -14,-1 -27,-2 -41,-4 3,-13 5,-25 8,-38 37,0 74,0 110,0 -1,7 -3,15 -5,22z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="306" y="231" class="fil1 fnt0">1D</text>
  </g>
  <g id="_935652064">
   <path level="9" d="M296 253c0,-1 1,-1 1,-2 15,-2 30,-4 45,-6 11,6 22,13 32,19 -3,3 -6,7 -9,10 -9,2 -18,5 -27,7 -6,-4 -12,-7 -19,-11 0,0 -1,0 -1,0 -8,-6 -15,-12 -23,-18z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="332" y="265" class="fil1 fnt0">1D</text>
  </g>
  <g id="_934799152">
   <path level="9" d="M344 243c1,-1 3,-3 4,-4 9,-2 18,-5 27,-7 11,4 21,7 32,11 -4,6 -8,12 -11,18 -5,-1 -10,-2 -15,-3 -1,1 -3,3 -4,4 -11,-6 -22,-13 -32,-19z" fill="#3399FF"/>
   <text x="372" y="250" class="fil1 fnt0">1D</text>
  </g>
  <g id="_935831616">
   <path level="9" d="M271 261c0,-2 0,-4 0,-5 2,-1 5,-2 7,-3 5,0 11,1 16,1 7,6 15,12 22,18 -8,2 -15,5 -23,7 -7,-6 -15,-12 -22,-18z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="288" y="269" class="fil1 fnt0">1D</text>
  </g>
  <g id="_933532368">
   <path level="9" d="M154 263c3,14 6,27 9,41 0,2 -1,3 -1,5 -17,-4 -38,-11 -56,-20 6,-12 12,-25 18,-37 10,4 19,8 30,11z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="130" y="282" class="fil1 fnt0" style="dominant-baseline: middle; text-anchor: middle;">1D</text>
  </g>
  <g id="_934988576">
   <path level="9" d="M213 275c7,14 13,27 20,41 0,2 0,3 0,5 -23,-2 -42,-6 -65,-11 0,-1 1,-3 1,-4 -3,-14 -6,-28 -9,-41 18,5 32,8 53,10z" fill="#3399FF"/>
   <text x="189" y="297" class="fil1 fnt0">1D</text>
  </g>
  <g id="_934835296">
   <path level="9" d="M218 276c17,2 34,3 53,3 7,5 14,10 21,15 -6,2 -13,4 -19,6 6,8 12,17 17,25 -19,0 -35,-1 -53,-3 0,-2 0,-4 0,-6 -6,-13 -13,-27 -19,-40z" fill="#3399FF"/>
   <text x="249" y="304" class="fil1 fnt0">1D</text>
  </g>
  <g id="_935660960">
   <path level="9" d="M286 302c19,-9 30,-17 36,-22 10,4 20,8 31,12 -2,2 -4,4 -7,7 10,8 21,15 31,23 -21,2 -49,4 -74,4 -6,-8 -11,-15 -17,-23z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="320" y="308" class="fil1 fnt0">1D</text>
  </g>
  <g id="_935940352" aria-describedby="ui-tooltip-232">
   <path level="9" d="M356 295c10,-11 18,-22 26,-34 9,2 17,3 26,5 -2,4 -4,7 -6,11 20,11 39,21 59,32 -23,5 -47,9 -71,12 -11,-8 -22,-17 -34,-25z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="392" y="297" class="fil1 fnt0">1D</text>
  </g>
  <g id="_935177216" aria-describedby="ui-tooltip-233">
   <path level="9" d="M410 270c4,-9 7,-20 9,-31 7,-1 14,-1 21,-2 -1,3 -2,6 -3,9 20,4 41,8 61,13 -8,15 -16,30 -23,45 -22,-12 -43,-23 -65,-35z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="448" y="272" class="fil1 fnt0">1D</text>
  </g>
  <g id="_935905664" aria-describedby="ui-tooltip-234">
   <path level="9" d="M477 311c3,12 6,24 9,35 30,-6 60,-13 89,-21 -5,-11 -10,-22 -15,-33 -27,7 -55,14 -83,19z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="520" y="323" class="fil1 fnt0">1D</text>
  </g>
  <g id="_935901952" aria-describedby="ui-tooltip-235">
   <path level="9" d="M652 263c0,12 0,25 0,37 -21,8 -42,14 -63,21 -5,-11 -9,-22 -14,-33 27,-8 52,-16 77,-24z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="612" y="297" class="fil1 fnt0">1D</text>
  </g>
  <g id="_935898240" aria-describedby="ui-tooltip-236">
   <path level="9" d="M462 314c3,12 6,24 9,35 -26,4 -52,7 -77,11 -1,-12 -3,-24 -4,-36 24,-3 48,-7 73,-10z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="425" y="341" class="fil1 fnt0">1D</text>
  </g>
  <g id="_935894528" aria-describedby="ui-tooltip-237">
   <path level="9" d="M301 330c0,12 0,24 0,36 27,0 53,-2 80,-4 -1,-12 -3,-24 -4,-36 -25,2 -51,4 -76,4z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="335" y="351" class="fil1 fnt0">1D</text>
  </g>
  <g id="_935890816" aria-describedby="ui-tooltip-238">
   <path level="9" d="M178 360c-2,-12 -4,-25 -7,-37 40,5 79,7 119,7 0,12 0,24 0,36 -38,0 -75,-2 -112,-6z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="229" y="351" class="fil1 fnt0">1D</text>
  </g>
  <g id="_935887104" aria-describedby="ui-tooltip-239">
   <path level="9" d="M101 312c6,13 11,27 17,40 17,3 34,5 51,7 -2,-13 -5,-25 -7,-38 -20,-3 -41,-6 -61,-10z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="134" y="340" class="fil1 fnt0">1D</text>
  </g>
  <g id="_935883392">
   <path level="9" d="M113 362c-7,-17 -15,-35 -22,-52 -21,-4 -41,-9 -61,-14 -8,14 -15,28 -23,42 35,10 71,18 107,25z" fill="#3399FF"/>
   <text x="54" y="331" class="fil1 fnt0">1D</text>
  </g>
  <g id="_935879680" aria-describedby="ui-tooltip-241">
   <path level="9" d="M178 9c-2,12 -4,25 -7,37 40,-5 79,-7 119,-7 0,-12 0,-24 0,-36 -38,0 -75,2 -112,6z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="230" y="26" class="fil1 fnt0">1D</text>
  </g>
  <g id="_935875968">
   <path level="9" d="M301 39c0,-12 0,-24 0,-36 27,0 53,2 80,4 -1,12 -3,24 -4,36 -25,-2 -51,-4 -76,-4z" fill="#3399FF" width="200" style="" height="30%" stroke="rgb(0,255,255)" stroke-width="0" transform=" rotate(0,0,0)"/>
   <text x="335" y="26" class="fil1 fnt0">1D</text>
  </g>
  <g id="_935866048">
   <path level="9" d="M462 55c3,-12 6,-24 9,-35 -26,-4 -52,-7 -77,-11 -1,12 -3,24 -4,36 24,3 48,7 73,10z" fill="#3399FF"/>
   <text x="425" y="36" class="fil1 fnt0">1D</text>
  </g>
  <g id="_935868064">
   <path level="9" d="M477 58c3,-12 6,-24 9,-35 30,6 60,13 89,21 -5,11 -10,22 -15,33 -27,-7 -55,-14 -83,-19z" fill="#3399FF"/>
   <text x="519" y="53" class="fil1 fnt0">1D</text>
  </g>
  <g id="_935871936">
   <path level="9" d="M652 106c0,-12 0,-25 0,-37 -21,-8 -42,-14 -63,-21 -5,11 -9,22 -14,33 27,8 52,16 77,24z" fill="#3399FF"/>
   <text x="612" y="79" class="fil1 fnt0">1D</text>
  </g>
</svg>

0 个答案:

没有答案