Javascript 使用zoom和zoomToFit时出现类型错误
我正在使用Cytoscape Web 1.0.2,并尝试使用Javascript 使用zoom和zoomToFit时出现类型错误,javascript,flash,cytoscape-web,Javascript,Flash,Cytoscape Web,我正在使用Cytoscape Web 1.0.2,并尝试使用 vis.zoom(0.5); 或 但是,调用zoom TypeError: a.zoomTo is not a function 这是缩放功能(来自cytoscapeweb.min.js) 下面是来自zoomToFit TypeError: this.swf().zoomToFit is not a function 以及方法本身 zoomToFit:function(){ this.swf().zoomToFit();
vis.zoom(0.5);
或
但是,调用zoom
TypeError: a.zoomTo is not a function
这是缩放功能(来自cytoscapeweb.min.js)
下面是来自zoomToFit
TypeError: this.swf().zoomToFit is not a function
以及方法本身
zoomToFit:function(){
this.swf().zoomToFit();
return this
}
这是怎么回事?我使用的是Ubuntu 12.04、Firefox 15.0和Shockwave Flash 11.2 r202
在带有冲击波闪光灯11.3 r31的铬合金上,错误变为
Uncaught TypeError: Object #<HTMLEmbedElement> has no method 'zoomTo'
uncaughttypeerror:对象#没有方法“zoomTo”
及
uncaughttypeerror:对象#没有方法“zoomToFit”
使用Windows时,我会遇到相同的错误,因此与操作系统无关。我做错了什么?您正在本地机器上尝试吗?我的意思是你正在处理本地html文件。 如果是这样,您需要在此处指定安全策略 对于试图运行您的文件的文件夹。添加位置并刷新页面
zoomToFit:function(){
this.swf().zoomToFit();
return this
}
Uncaught TypeError: Object #<HTMLEmbedElement> has no method 'zoomTo'
Uncaught TypeError: Object #<HTMLEmbedElement> has no method 'zoomToFit'