/*
 * Patch to fix the PictureMarkerSymbol issue in Firefox 3.5
 */

(function() {
  // dojo versions later than 1.3.2 should be fine
  if (dojo.isFF == 3.5 && dojo.version.major == 1 && (dojo.version.minor < 3  || (dojo.version.minor == 3 && dojo.version.patch < 3))) {
    var setRawNode = function(rawNode){
        // summary:
        //  assigns and clears the underlying node that will represent this
        //  shape. Once set, transforms, gradients, etc, can be applied.
        //  (no fill & stroke by default)
        var r = this.rawNode = rawNode;
        if (this.shape.type != "image") {
            r.setAttribute("fill", "none");
        }
        r.setAttribute("fill-opacity", 0);
        r.setAttribute("stroke", "none");
        r.setAttribute("stroke-opacity", 0);
        r.setAttribute("stroke-width", 1);
        r.setAttribute("stroke-linecap", "butt");
        r.setAttribute("stroke-linejoin", "miter");
        r.setAttribute("stroke-miterlimit", 4);
    };
  
    dojo.addOnLoad(function() {
      dojox.gfx.Shape.prototype.setRawNode = setRawNode;
    });
  }
}());

