-
Notifications
You must be signed in to change notification settings - Fork 419
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
Centralize isConnection
, isLabel
and isRoot
Checks
#783
Conversation
@nikku When fixing bpmn-io/bpmn-js#1901 I tried this approach. I'd vote for using actual |
What is the benefit of |
My first idea was using |
As discussed with @nikku I will use |
9a2f5fb
to
94a6751
Compare
instanceof
ChecksisConnection
, isLabel
and isRoot
Checks
test/spec/model/ModelSpec.js
Outdated
@@ -1,8 +1,13 @@ | |||
import { | |||
create, | |||
isModelElement | |||
isElementInstance |
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.
Why would we rename this?
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.
We don't have to. One thing I was wondering about is the fact we use this check in Modeling
. Doesn't that have the same issue with having more than one diagram-js?
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.
Yes, it does. However it was never a problem to date. A safe way is to rather do the check in the elementFactory
, hence my prior attempt to move it there.
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.
Reverted.
94a6751
to
f5bf6a6
Compare
f5bf6a6
to
8a04f55
Compare
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.
Good stuff.
isConnection
,isLabel
andisRoot
checks fromModelUtil
and testRequired by bpmn-io/bpmn-js#1903
Related to bpmn-io/bpmn-js#1901