-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rightMenu #88
base: master
Are you sure you want to change the base?
rightMenu #88
Conversation
wb-wcq372632 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
src/canvas/baseCanvas.less
Outdated
@@ -41,7 +41,79 @@ | |||
display: block; | |||
} | |||
} | |||
|
|||
.endpoint-tips-menu{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个menu应该是能支持所有的节点,名字有问题
src/service/sevice.js
Outdated
const _ = require('lodash'); | ||
|
||
|
||
function createMenuList(param, callBack, e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
抽象库不能这样写。。。event是业务或者外部耦合的,不应该传进来处理
src/service/sevice.js
Outdated
top: evt.clientY | ||
}; | ||
if (param.type === 'tips') { | ||
$(document.body).find('.endpoint-tips-menu').remove(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个使用方法上有问题
src/service/sevice.js
Outdated
left: evt.clientX, | ||
top: evt.clientY | ||
}; | ||
if (param.type === 'tips') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我建议分开2个方法吧,不要耦合在一起
index.js
Outdated
module.exports = { | ||
Canvas, | ||
Edge, | ||
Endpoint, | ||
Group, | ||
Node | ||
Node, | ||
ServiceCanvas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个应该叫MenuService
const $ = require('jquery'); | ||
const _ = require('lodash'); | ||
|
||
class MenuService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我不太建议写成clasa,假如用户想使用的话,应该比较简单地let menuSrevices = require('xxx');menuSrevices.shou(xxx);这样比较清爽
rightMenu