WelcomeForumsCommunitywijmo "e.item is not a function"

Wijmo Team Member
Carsten Madsen posted on June 29, 2012 at 11:41 am link

Hello

I get “e.item is not a function” when i run http://wijmo.com/demo/explore/#editor|overview with Firefox 13 & firebug open running FC17.

So I can verify the bug described here http://wijmo.com/topic/wijdropdown-with-tab-navigation/

BR
Carsten

Wijmo Team Member
abdiasm posted on July 2, 2012 at 10:05 am link

I’m sorry I cannot replicate the issue when I open http://wijmo.com/demo/explore/#editor|overview with Firefox 13.0.1 and I have Firebug 1.9.2 on a Win 7 machine. Could you provide some more details that might be helpful in investigating the issue.

Thanks

Answer
Wijmo Team Member
Carsten Madsen posted on July 3, 2012 at 7:55 am link

This is the line causing problem according to firebug in FF:

(function(){“use strict”;if(!window.Raphael)return;$.extend({round:function(a,b){return!a?0:Globalize.parseFloat(a.toFixed(b),10,Globalize.culture(“en”))},toOADate:function(b){var c=864e5,a=b-new Date(1900,0,1)+2*c;return a},fromOADate:function(a){var c=864e5,b=new Date(a-2*c+ +new Date(1900,0,1));return b},arrayClone:function(b){var a=[];$.each(b,function(c,b){a.push($.extend(true,{},b))});return a}});$.wijraphael={isSVGElem:function(a){var b=”http://www.w3.org/2000/svg”;return a.nodeType===1&&a.namespaceURI===b},addClass:function(b,a){a=a||”";$.each(b,function(){if($.wijraphael.isSVGElem(this)){var b=this;$.each(a.split(/\s+/),function(d,c){var a=b.className?b.className.baseVal:b.getAttribute(“class”);if($.inArray(c,a.split(/\s+/))===-1){a+=(a?” “:”")+c;if(b.className)b.className.baseVal=a;else b.setAttribute(“class”,a)}})}else $(this).addClass(a)})},clearRaphaelCache:function(){Raphael.path2curve.cache=null;Raphael.path2curve.count=null;Raphael.parseTransformString.cache=null;Raphael.parseTransformString.count=null;Raphael.parsePathString.cache=null;Raphael.parsePathString.count=null;Raphael._pathToAbsolute.cache=null;Raphael._pathToAbsolute.count=null},getPositionByAngle:function(e,f,c,d){var a={},b=Raphael.rad(d);a.x=e+c*Math.cos(-1*b);a.y=f+c*Math.sin(-1*b);return a},hasClass:function(a,b){if(!b||b.length===0)return false;if($.wijraphael.isSVGElem(a)){var d=a.className?a.className.baseVal:a.getAttribute(“class”),c=false;$.each(d.split(/\s+/),function(d,a){if(a===b){c=true;return false}});return c}else return $(a).hasClass(b)},sector:function(b,c,a,d,e){var f=$.wijraphael.getPositionByAngle(b,c,a,d),g=$.wijraphael.getPositionByAngle(b,c,a,e);return["M",b,c,"L",f.x,f.y,"A",a,a,0,+(e-d>180),0,g.x,g.y,"z"]}};$.expr.filter.CLASS=function(a,c){var b=!$.wijraphael.isSVGElem(a)?a.className:a.className?a.className.baseVal:a.getAttribute(“class”);return(” “+b+” “).indexOf(c)>-1};$.expr.preFilter.CLASS=function(c,e,f,g,i,h){var b=0,a=null,d=null;c=” “+c[1].replace(/\\/g,”")+” “;if(h)return c;for(b=0,a={};a;b++){a=e;if(!a)try{a=e.item(b)}catch(j){}if(a){d=!$.wijraphael.isSVGElem(a)?a.className:(a.className?a.className.baseVal:”")||a.getAttribute(“class”);if(i^(d&&(” “+d+” “).indexOf(c)>-1))!f&&g.push(a);else if(f)e=false}}return false};Raphael.fn.tri=function(b,c,e){var g=b,j=c-e,a=Math.cos(Math.PI/6)*e,d=Math.tan(Math.PI/3)*a,h=b+a,k=c+d,i=b-a,l=c+d,f=["M",g,j,"L",h,k,"L",i,l,"z"];return this.path(f.concat(” “))};Raphael.fn.invertedTri=function(b,c,e){var g=b,j=c+e,a=Math.cos(Math.PI/6)*e,d=Math.tan(Math.PI/3)*a,h=b+a,k=c-d,i=b-a,l=c-d,f=["M",g,j,"L",h,k,"L",i,l,"z"];return this.path(f.concat(” “))};Raphael.fn.box=function(b,c,e){var a=Math.cos(Math.PI/4)*e,d=["M",b-a,c-a,"L",b+a,c-a,"L",b+a,c+a,"L",b-a,c+a,"z"];return this.path(d.concat(” “))};Raphael.fn.diamond=function(b,c,a){var d=["M",b,c-a,"L",b+a,c,"L",b,c+a,"L",b-a,c,"z"];return this.path(d.concat(” “))};Raphael.fn.cross=function(b,c,e){var a=Math.cos(Math.PI/4)*e,d=["M",b-a,c-a,"L",b+a,c+a,"M",b-a,c+a,"L",b+a,c-a];return this.path(d.concat(” “))};Raphael.fn.paintMarker=function(f,d,e,b){var c=this,a=null;if(!f)f=”circle”;switch(f){case”circle”:a=c.circle(d,e,b);break;case”tri”:a=c.tri(d,e,b);break;case”invertedTri”:a=c.invertedTri(d,e,b);break;case”box”:a=c.box(d,e,b);break;case”diamond”:a=c.diamond(d,e,b);break;case”cross”:a=c.cross(d,e,b)}return a};Raphael.prototype.htmlText=function(k,l,a,i,e,d){function h(b,a,d){var f=/< (b|strong)>/,e=/< (i|em)>/,c=/href=[\"\']([^\"\']+)[\"\']/,g=/|\\r/i),g=this,b=g.set(),c=0,f=0;e=e||3;d=d||5;$.each(j,function(m,k){var j=0,l=k.split(“|||”);k=k.replace(/< ([A-Za-z]+(.|\n)*?)>/g,”|||< $1>“).replace(/< \/([A-Za-z]*)>/g,”|||”);$.each(l,function(o,l){var k=null,d=null,m=0,n=0;if(l!==”"){k=l;k=$.trim(k.replace(/< (.|\n)*?>/g,”"));a=g.text(0,0,k);h(a,l,i);d=a.wijGetBBox();m=d.width/2+c;n=-d.height/2+f;c=c+d.width+e;a.translate(m,n);b.push(a);if(ji){if(c.length){e.push(c);d=a[0]}c=[a.shift()]}else c.push(a.shift());a.length===0&&e.push(c);b.wijRemove();b=null}return e}$.each(k(m,g,j),function(q,p){var m=p.join(” “),o=l||”near”,c=h.text(n,i,m),f=0,k=0;c.attr(j);a=c.wijGetBBox();switch(o){case”near”:f=g-a.width/2;break;case”center”:f+=g/2;break;case”far”:f+=a.width/2}if(b){k+=a.height/2/Math.abs(Math.sin(b));i+=a.height/Math.abs(Math.sin(b))}else{k+=a.height/2;i+=a.height}a.x+=f;a.y+=k;if(b)c.attr({x:c.attr(“x”)+f,y:c.attr(“y”)+k});else c.transform(Raphael.format(“…T{0},{1}”,f,k));d.push(c);e.push(a)});if(b){a=d.wijGetBBox();if(d.length>1){$.each(d,function(c,b){b.attr({y:b.attr(“y”)-a.height/2});e[c].y-=a.height/2});c={x:a.x+a.width/2,y:a.y+a.height/2};$.each(d,function(l,g){var f=Math,h=e[l],d={x:h.x+h.width/2,y:h.y+h.height/2},j=f.sqrt(f.pow(d.x-c.x,2)+f.pow(d.y-c.y,2)),a=0,i=null,k=null;g.attr({rotation:b});if(j===0)return true;i=g.wijGetBBox();a=Raphael.deg(f.asin(f.abs(d.y-c.y)/j));if(d.y>c.y)if(d.x>c.x)a-=360;else a=-1*(a+180);else if(d.x>c.x)a*=-1;else a=-1*(180-a);k=$.wijraphael.getPositionByAngle(c.x,c.y,j,-1*(b+a));g.attr({y:g.attr(“y”)+k.y-i.y-i.height/2})})}else d[0].transform(Raphael.format(“…R{0}”,b))}return d};Raphael.fn.getSVG=function(){function l(e,b){var a=”< "+e+" ",c=null,d=false;$.each(b,function(b,c){if(b==="text"||b==="opacity"||b==="transform"||b==="path"||b==="w"||b==="h"||b==="translation")return true;if(c){if(b==="stroke"&&c===0)c="none";a+=b+"='"+c+"' "}});if(b.opacity){c=b.opacity;a+="opacity='"+c+"' style='opacity:"+c+";";d=true}if(b.transform&&b.transform.length>0){c=b.transform;if(d)a+=”transform:”+c;else{a+=”style=’transform:”+c;d=true}}if(d)a+=”‘”;if(b.text){c=b.text;a+=”>“+c+”“}else a+=”>”;a+=”“;return a}for(var g=this,j=’Created with Raphael‘,c=”",h,f,d,e=0,k=0,b=0,i=0,a=g.bottom;a;a=a.next)if(a&&a.type)switch(a.type){case”path”:for(e=0,k=a.attrs.path.length;e;if(b<1)c+=d;else if(b===i-1)c+=d;else c+=d+","}}if(c&&c.length>0)a.attrs.d=c.replace(/,/g,” “);break;case”text”:if(!a.attrs["text-anchor"])a.attrs["text-anchor"]=”middle”;break;case”image”:h=a.transformations;a.attrs.transform=h?h.join(” “):”";break;case”ellipse”:case”rect”:j+=l(a.type,a.attrs)}j+=”“;return j};Raphael.el.wijRemove=function(){var a=this,b;if(a.removed)return;if(a.node.parentNode){b=$(a.node);a.stop().remove();b.remove()}};Raphael.st.wijRemove=function(){$.each(this,function(b,a){a.wijRemove&&a.wijRemove()})};Raphael.el.wijGetBBox=function(){return this.getBBox()};Raphael.el.wijAnimate=function(a,g,b,f){if(!a||$.isEmptyObject(a))return;var e=this.shadow,d=0,c={easeInCubic:”>”,easeOutCubic:”< ",easeInOutCubic:"<>“,easeInBack:”backIn”,easeOutBack:”backOut”,easeOutElastic:”elastic”,easeOutBounce:”bounce”};if(c)b=c;this.animate(a,g,b,f);c=null;if(e&&e.offset){d=e.offset;if(a.x)a.x+=d;if(a.y)a.y+=d;this.shadow.animate(a,g,b,f)}};Raphael.el.wijAttr=function(a,c){this.attr(a,c);if(this.shadow)if(typeof a===”object”){var b=$.extend(true,{},a);if(b.fill)delete b.fill;if(b.stroke)delete b.stroke;if(b["stroke-width"])delete b["stroke-width"];this.shadow.attr(b,c)}else if(typeof a===”string”)switch(a){case”clip-rect”:case”cx”:case”cy”:case”fill-opacity”:case”font”:case”font-family”:case”font-size”:case”font-weight”:case”height”:case”opacity”:case”path”:case”r”:case”rotation”:case”rx”:case”ry”:case”scale”:case”stroke-dasharray”:case”stroke-linecap”:case”stroke-linejoin”:case”stroke-miterlimit”:case”stroke-opacity”:case”stroke-width”:case”translation”:case”width”:this.shadow.attr(a,c);break;case”x”:this.shadow.attr(a,c);this.shadow.attr(“transform”,”…t1,0″);break;case”y”:this.shadow.attr(a,c);this.shadow.attr(“transform”,”…t0,1″)}};Raphael.st.wijAttr=function(b,a){$.each(this.items,function(d,c){c.wijAttr(b,a)});return this};Raphael.st.wijAnimate=function(f,g,e,d){var a=0,c=0,b=null;for(a=0,c=this.items.length;a=0;f–){a=this.items[f].wijGetBBox();b[e](a.x);c[e](a.y);j[e](a.x+a.width);i[e](a.y+a.height)}b=h[d](0,b);c=h[d](0,c);return{x:b,y:c,width:g[d](0,j)-b,height:g[d](0,i)-c}}})();

Answer
Wijmo Team Member
C1_JustinM posted on July 6, 2012 at 12:58 pm link

I just finished testing this on a VM running Fedora 17 running Firefox 13.0.1, and Firebug 1.9.2. I am still unable to reproduce this error.

Answer

This topic has 3 voices, contains 3 replies, and was last updated by  C1_JustinM 349 days ago.

You must be logged in to reply to this topic.