this.line = this.obj.graphics[gfx].getDojoShape().getEventSource(); $(this.line).attr("stroke-width")
var legendPane = $('div#legendPane') $(legendPane).on("mouseenter mouseleave", "table.esriLegendLayer > tbody > tr", function(evt){ this.obj = $(this).data() if(typeof(this.obj) == "object"){ if( evt.type == "mouseenter"){ for(gfx in this.obj.graphics){ if (this.obj.graphics[gfx].geometry.type == "polyline"){ try{ this.line = this.obj.graphics[gfx].getDojoShape().getEventSource(); //////////////////////////////////////// ///////displays 'undefined' in IE///// /////////////////////////////////////// alert($(this.line).attr("stroke-width")) $(this.line).attr("stroke-width") == 2 ? $(this.line).attr("stroke-width", "8") : null; }catch (err){} }else if (this.obj.graphics[gfx].geometry.type == "point") { try { this.point = this.obj.graphics[gfx].getDojoShape().getEventSource(); $(this.point).attr("r") == "8" ? $(this.point).attr("r", "13") : null; $(this.point).attr("r") == "2.5" ? $(this.point).attr("r", "4") : null; } catch (err) {} } } }else if.....
Solved! Go to Solution.
if( evt.type == "mouseenter"){....
for(gfx in this.obj.graphics){....
if (this.obj.graphics[gfx].geometry.type == "polyline"){...
this.line = this.obj.graphics[gfx].getDojoShape().getEventSource()
this.stroke = $(this.line).attr("stroke-width")
(5)...use jQuery's attr() method to access this DOM element's "stroke-width" valuethis.stroke = $(this.line).attr("stroke-width")
if(dojox.gfx.renderer==="vml"){ this.stroke = $(this.line).attr("stroke-weight") }else{ this.stroke = $(this.line).attr("stroke-width") }
if( evt.type == "mouseenter"){//...if the event is mouseenter// for(gfx in this.obj.graphics){//...loop the map graphics// if (this.obj.graphics[gfx].geometry.type == "polyline"){//...if the graphic is a polyline// this.gfx = this.obj.graphics[gfx]//...create a new reference for it// if(this.gfx.symbol.width == 2){//....by default, the polyline's width is set to 2// this.newSymbol = new esri.symbol.SimpleLineSymbol(this.gfx.symbol.style, this.gfx.symbol.color,8)//....create our new symbol with a new width of '8'// this.gfx.setSymbol(this.newSymbol) //...set our newSymbol to this graphic// }...