Branch: refs/heads/unstable
Home: https://github.com/cytoscape/cytoscape.js
Commit: b241edbd080f711ec2ada52afa3b55c5d29cd89d
https://github.com/cytoscape/cytoscape.js/commit/b241edbd080f711ec2ada52afa3b55c5d29cd89d
Author: Max Franz <[email protected]>
Date: 2019-04-24 (Wed, 24 Apr 2019)
Changed paths:
M src/collection/index.js
Log Message:
-----------
Allow the `Collection` constructor to accept an array of collections
It currently assumes that a collection-like object is of class `Element`, but a
`Collection` could accidentally be passed instead. It's easy to accidentally
pass in an array of collections each of size one, because different parts of
the API may return an `Element` or `Collection` depending on the case. From a
consumer standpoint, an `Element` is exactly the same as a `Collection`, but
for internal use we sometimes need to differentiate.
This still assumes that each collection is of size one. If you do something
really weird like `new Collection(cy, [ ele1, ele2, eles3 ])` where `eles3` has
more than one element, it worn't work. It's probably not worth the expense of
adding checks for that.
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/cytoscape-cvs.
For more options, visit https://groups.google.com/d/optout.