clientIO / joint

A proven SVG-based JavaScript diagramming library powering exceptional UIs
https://jointjs.com
Mozilla Public License 2.0
4.48k stars 839 forks source link

feature(mvc.Collection): update collection methods #2461

Closed jamesgeorgewilliams closed 5 months ago

jamesgeorgewilliams commented 5 months ago

Description

Update mvc.Collection methods and relevant types.

Methods added:

Methods removed:


This PR fixes the mvc.Collection tests. The mvc.Events tests were copied to the mvc.collection.js test file by accident, so this just reverses that.

Around 14 instances of pluck were removed from the test file, and replaced with map. collection.pluck('id') => collection.map((model) => model.get('id'))

The PR also removes the instances of Array.from from mvc.Collection.


The PR also fixes exposing extend and addMethodsUtil from mvcUtils to the user.

TODO: