wenyuan / jtopo_topology Goto Github PK
View Code? Open in Web Editor NEW基于 jtopo 二次封装,拓扑图编辑器
Home Page: http://www.jtopo.com/
基于 jtopo 二次封装,拓扑图编辑器
Home Page: http://www.jtopo.com/
类似于WEB地图,鼠标指在哪儿就在哪儿,谢谢大佬,也可以给一个实现思路,可以吗?
您好:
我是这么写的
zIndexAdd: function () {
if (editor.currentNode instanceof JTopo.Node) {
console.log(editor.currentNode.zIndex)
editor.currentNode.zIndex =+ 10;//node的层级属性zIndex的值发生了变化。但是图形却没有移动到上层。初始化整个图形zIndex还是有效的。就是动态改变图形不会变层级。
}
}
,其他的比如角度之类的已修改就变了。
还发现只要设置的zIndex再做其他操作都不生效,比如先设置zIndex,再删除这个节点也不行。
editor.currentNode.zIndex =+ 10;
editor.scene.remove(editor.currentNode.zIndex) //结果节点删除不了
但是先设置其他的再操作不会这样。
比如
editor.currentNode.rotate =+ 10;
editor.scene.remove(editor.currentNode.zIndex)//结果节点可删除
求解。
大佬的vue版本什么时候搬上来,求更新
上代码
let canvas: any = document.getElementById('learn-canvas'); this.stage = new JTopo.Stage(canvas); this.stage.width = 1000; this.stage.height = 200;
错误信息:
ProductListComponent.html:3 ERROR TypeError: Cannot set property width of [object Object] which has only a getter at JTopoComponent.push../src/app/jTopo/jTopo.component.ts.JTopoComponent.ngOnInit (jTopo.component.ts:26) at checkAndUpdateDirectiveInline (core.js:21764) at checkAndUpdateNodeInline (core.js:29983) at checkAndUpdateNode (core.js:29945) at debugCheckAndUpdateNode (core.js:30579) at debugCheckDirectivesFn (core.js:30539) at Object.eval [as updateDirectives] (ProductListComponent.html:30) at Object.debugUpdateDirectives [as updateDirectives] (core.js:30531) at checkAndUpdateView (core.js:29927) at callViewAction (core.js:30168)
希望有人能帮忙解答一下
如何避免节点编辑、加载时重叠,能不能支持3D
画布上,点击右键不起作用
// 加载网络拓扑图
editor.loadTopology(rootPath + '/json/network.json', "img/backimg.png");
TopologyPanel.prototype.loadTopology = function (url, topologyGuid, backImg) {
想写个修改的模板,但不知道应该怎么写
点击保存按钮后,好像无反应。。。
bellow is not defined:
and the loadTopology
function has 3 parameters,
https://github.com/xwenyuan/jtopo_topology/blob/c2040bf879f8836d41310ab2acfd9dba0b50d2fb/static/public/js/jtopo-editor.js#L67
and also missing util.js
in static/public/js/
please fix these errors, I clone this project, it can't run very well.
大神,vue 的版本可否刚一下效果
demo 上连线是没有箭头的?大伙遇见过吗?
切换拓扑图会一闪一闪
建议修改为:
向上:放大
向下:缩小
jtopo-0.4.8-dev.js 1103行
null != this.wheelZoom && (b > 0 ? this.zoomOut(this.wheelZoom) : this.zoomIn(this.wheelZoom))
请教一下,我打开页面,在实例化的时候,将线也作为可以拖拽部分,
var nodes_line = $("[topo-div-type='topo-link']");
var nodes_line = nodes_line.length;
for (var i = 0; i < nodes_line; i++) {
var text = $(nodes_line[i]).find("span").eq(0).text();
editor.drag(nodes_line[i], document.getElementById('topology-canvas'), text);
}
但是拖在在舞台区,就成了一个图片,请教一下这个怎么处理才能连线
当场景放大到一定程度后添加分组显示不出来,缩小后又能正常显示了。
如题:我刚下载试了下,大神这个问题比较严重啊。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.